// Contact page function ContactPage() { const [topic, setTopic] = React.useState("general"); const [game, setGame] = React.useState(""); const [name, setName] = React.useState(""); const [email, setEmail] = React.useState(""); const [message, setMessage] = React.useState(""); const [website, setWebsite] = React.useState(""); // honeypot const [status, setStatus] = React.useState("idle"); // idle | sending | sent | error const [errMsg, setErrMsg] = React.useState(""); React.useEffect(() => { const params = new URLSearchParams(window.location.search); if (params.get("topic")) setTopic(params.get("topic")); if (params.get("game")) setGame(params.get("game")); }, []); React.useEffect(() => { if (topic === "funding" && !message) { setMessage(`Hi Martin — I'd like to talk about ${game || "your projects"}.`); } }, [topic, game]); async function submit(e) { e.preventDefault(); setStatus("sending"); setErrMsg(""); try { const res = await fetch("contact.php", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ name, email, topic, game, message, website }), }); const json = await res.json().catch(() => ({})); if (res.ok && json.ok) { setStatus("sent"); } else { setStatus("error"); setErrMsg(json.error || "Something went wrong. Email me directly."); } } catch (err) { setStatus("error"); setErrMsg("Network error. Email me directly at martin2c51@gmail.com."); } } return (
// SAY HELLO

Get in touch.

Hiring, investing, writing about us, or just here to talk shop — pick the lane that fits.

{topic === "funding" && ( )}