--- /** * The confirmation after an inquiry. The inquiries API sets the short-lived * `gk-inquiry` cookie (URL-encoded JSON: type, name, email, rows) before it * redirects here; the page shows it once and clears it. Without the cookie * the page still reads correctly, showing `?type=` when given. */ import Button from "@gk/ui/components/Button.astro"; import PageShell from "@gk/ui/components/PageShell.astro"; import Seal from "@gk/ui/components/Seal.astro"; import Star from "@gk/ui/components/Star.astro"; import TickRing from "@gk/ui/components/TickRing.astro"; import TickScale from "@gk/ui/components/TickScale.astro"; import { inquiryTypes, parseInquiryType, parseSentSummary } from "../../lib/work.ts"; const sent = parseSentSummary(Astro.cookies.get("gk-inquiry")?.value); if (sent) Astro.cookies.delete("gk-inquiry", { path: "/" }); Astro.response.headers.set("Cache-Control", "private, no-store"); const type = sent?.type ?? parseInquiryType(Astro.url.searchParams.get("type")); const typeLabel = inquiryTypes.find((t) => t.value === type)?.summary; const rows = [ ...(typeLabel ? [{ label: "Type", value: typeLabel }] : []), ...(sent?.rows ?? []), ...(sent?.email ? [{ label: "Reply to", value: sent.email }] : []), ]; const firstName = sent?.name?.split(/\s+/)[0]; const steps = [ { title: "I read it", text: "Usually within a day or two." }, { title: "I reply", text: "With questions, a quote, or a time to talk." }, { title: "We settle the details", text: "Nothing starts until you say yes." }, ]; ---
Inquiry sent

Your note is on its way

Thanks{firstName ? `, ${firstName}` : ""}. I read every inquiry myself and reply within [PLACEHOLDER] days.

    { steps.map((st, i) => (
  1. {i + 1} {st.title} {st.text}
  2. )) }
{ rows.length > 0 && (

What you sent

{rows.map((r) => (
{r.label}
{r.value}
))}
) }