"use client"; import { useState } from "react"; export default function Contact() { const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [message, setMessage] = useState(""); const [submitted, setSubmitted] = useState(false); const [loading, setLoading] = useState(false); const [error, setError] = useState(false); const handleSubmit = async (e: React.SubmitEvent) => { e.preventDefault(); setLoading(true); setError(false); try { const response = await fetch("https://andre-kempf.com/sendMail.php", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ name, email, message }), }); if (response.ok) { setSubmitted(true); setName(""); setEmail(""); setMessage(""); } else { setError(true); } } catch (err) { console.error("Mail send error:", err); setError(true); } finally { setLoading(false); } }; return (
{/* Title */}

// 03. Get in Touch

Contact me.

{/* Left column */}

// Got a project in mind?

Feel free to reach out using this form. I am always open to discussing new projects, creative ideas, or opportunities to contribute to your team.

// Terminal Direct Contact
chneemann@portfolio: ~$ mail --send
Status:{" "} Ready to receive messages
// Prefer email? dev@andre-kempf.com
{/* Right column */}
{submitted ? (

Thank you!

Your message has been sent successfully. I'll get back to you as soon as possible!

) : (
setName(e.target.value)} placeholder="John Doe" className="w-full px-4 py-2.5 rounded-xl bg-slate-950/60 border border-slate-800 text-slate-100 placeholder:text-slate-600 focus:outline-none focus:border-blue-500/80 focus:ring-1 focus:ring-blue-500/80 transition-colors text-sm" />
setEmail(e.target.value)} placeholder="john@example.com" className="w-full px-4 py-2.5 rounded-xl bg-slate-950/60 border border-slate-800 text-slate-100 placeholder:text-slate-600 focus:outline-none focus:border-blue-500/80 focus:ring-1 focus:ring-blue-500/80 transition-colors text-sm" />