feat: rebuild marketing site with full component suite and preview

This commit is contained in:
SinachPat
2026-08-27 16:53:12 +01:00
parent 0a2ae76f34
commit 3580c00fa1
24 changed files with 2883 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
import { useState } from "react";
/**
* Pre-launch email capture. Front-end demo only: on submit it shows a success
* state. Wire `postEmail` to the real CRM endpoint (FluentCRM tag `prelaunch`)
* when the backend is ready.
*/
export default function EmailForm({ className = "", cta = "Send it to me" }) {
const [email, setEmail] = useState("");
const [done, setDone] = useState(false);
async function onSubmit(e) {
e.preventDefault();
if (!email) return;
// TODO: await postEmail(email) — POST to CRM, then setDone(true)
setDone(true);
}
if (done) {
return (
<p className="ok-msg" role="status">
✓ You’re on the list — check your inbox for the preview chapter.
</p>
);
}
return (
<form className={className} onSubmit={onSubmit} noValidate>
<input
className="field"
type="email"
required
placeholder="you@work.com"
aria-label="Email address"
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
<button className="btn btn-primary" type="submit">
{cta}
</button>
</form>
);
}