import { useState } from "react"; import PageShell from "../components/PageShell.jsx"; /* ═══════════════════════════════════════════════════════════════ Feedback page. Section ids match the nav hashes. Right now there's one: #website. Add more entries to SECTIONS (bottom of file) as the page grows — program feedback, retreat surveys, etc. Nothing is persisted. handleSubmit just flips to the thank-you panel; the POST goes where the comment marks it. ═══════════════════════════════════════════════════════════════ */ const ACCENT = "#138ba0"; const MUTED = "#4a6b72"; const MAX_CHARS = 1500; // Selectable feedback types. Add or reword freely — the grid reflows. const FEEDBACK_TYPES = [ { id: "broken", label: "Something's broken", hint: "A link, image, or button that doesn't work", }, { id: "confusing", label: "Hard to use", hint: "Something you couldn't find or follow", }, { id: "outdated", label: "Wrong or missing info", hint: "Old dates, typos, an event that isn't listed", }, { id: "request", label: "Feature request", hint: "Something you'd like the site to do", }, { id: "praise", label: "Kind words", hint: "Tell us what's working well", }, { id: "other", label: "Something else", hint: "Anything that doesn't fit the boxes above", }, ]; /* ── Shared field chrome ─────────────────────────────────────── */ const fieldClass = "w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] " + "placeholder:text-[#4a6b72]/50 outline-none transition-colors " + "focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25"; function OptionalTag() { return ( Optional ); } /* ── Type picker ─────────────────────────────────────────────── */ function TypePicker({ value, onChange }) { return (
What kind of feedback is this?

Pick the closest fit. It helps us route it to the right person.

{FEEDBACK_TYPES.map((type) => { const selected = value === type.id; return ( ); })}
); } /* ── The form ────────────────────────────────────────────────── */ function WebsiteFeedbackForm() { const [type, setType] = useState(null); const [message, setMessage] = useState(""); const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [sent, setSent] = useState(false); const ready = Boolean(type) && message.trim().length > 0; function handleSubmit(event) { event.preventDefault(); if (!ready) return; // TODO: POST { type, message, name, email } somewhere. setSent(true); } function reset() { setType(null); setMessage(""); setName(""); setEmail(""); setSent(false); } if (sent) { return (

Thanks — we've got it

{email ? `We'll follow up at ${email} if we have questions.` : "You sent this anonymously, so we won't be able to reply — but we read everything that comes in."}

); } return (
{/* Message */}

The page you were on and what you expected to happen are the two most useful things you can give us.