--- /** * The confirmation after an order request. /api/orders sets the short-lived * `gk-order` cookie (URL-encoded JSON: name, email, line, rows) before it * redirects here; the page shows it once and clears it. Without the cookie * the page still reads correctly. */ import Button from "@gk/ui/components/Button.astro"; import PageShell from "@gk/ui/components/PageShell.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 Breadcrumb from "../../../components/store/Breadcrumb.astro"; import { parseOrderSent } from "../../../lib/forms.ts"; import { site } from "../../../lib/page.ts"; import { storeNav, storeState } from "../../../lib/store.ts"; const sent = parseOrderSent(Astro.cookies.get("gk-order")?.value); if (sent) Astro.cookies.delete("gk-order", { path: "/" }); Astro.response.headers.set("Cache-Control", "private, no-store"); const s = await site().catch(() => null); const replyTime = s?.settings()?.replyTime ?? "a few days"; const st = s ? storeState(s) : undefined; const line = sent?.lineSlug ? st?.lines.find((l) => l.slug === sent.lineSlug) : undefined; const turnaround = line ? st?.category(line.data.category).turnaround : undefined; const rows = [ ...(sent?.line ? [{ label: "Line", value: sent.line }] : []), ...(sent?.rows ?? []), ...(sent?.email ? [{ label: "Reply to", value: sent.email }] : []), ]; const firstName = sent?.name?.split(/\s+/)[0]; const steps = [ { title: "I check the request", text: "The details, the options and my queue." }, { title: "I confirm with you", text: "The total and the timing, by email. No payment is taken through the site." }, { title: "I start once you say yes", text: turnaround ?? "Nothing is made until we agree." }, ]; ---

Your request is in

Thanks{firstName ? `, ${firstName}` : ""}. I read every order request myself and reply within {replyTime}.

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