feat(intake): post-submit thanks page

Phase 8a Task 12. Static page; no card read, no brief shown, no
link to the signed-in board. Resolves the token only to confirm it
is still alive — a revoked token landing here still shows 'Thanks'
so the submission cannot be probed.
This commit is contained in:
Dave 2026-09-21 02:23:04 +02:00
parent a3972f5f19
commit 07ece87de5

View file

@ -0,0 +1,61 @@
import Link from "next/link";
import { resolveIntakeLink } from "@/lib/intake-links";
/**
* The "thanks" page after a public submission.
*
* Intentionally static: it does not read the card, does not show the brief,
* does not link to the board. An anonymous submitter should see a clear
* acknowledgement and a way to file another request; nothing more. The card
* detail page is signed-in only, and linking to it from here would either
* 404 or force a session we deliberately do not require.
*/
export default async function IntakeSentPage({
params,
}: {
params: Promise<{ token: string; cardId: string }>;
}) {
const { token } = await params;
// We don't actually need the card or the link to render this page; we
// resolve the link only to confirm the token is still alive. A revoked
// token landing on /sent/ would otherwise confirm the submission
// happened — same "doesn't shout" property as the intake page.
const link = await resolveIntakeLink(token);
if (!link || !link.active) {
return (
<main className="mx-auto max-w-xl space-y-3 p-6">
<h1 className="text-lg font-semibold text-text-primary">Thanks</h1>
<p className="text-sm text-text-secondary">
Your message was sent.
</p>
</main>
);
}
return (
<main className="mx-auto max-w-xl space-y-4 p-6">
<header className="space-y-1">
<h1 className="text-lg font-semibold text-text-primary">Thanks</h1>
<p className="text-sm text-text-secondary">
Your request has been sent to the developer.
</p>
</header>
<p className="text-sm text-text-muted">
They will see it on their board and get back to you about what
happens next. There is no notification for you to wait on here.
</p>
<div className="border-t border-border-subtle pt-3">
<Link
href={`/intake/${token}`}
className="inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-raised"
>
Send another request
</Link>
</div>
</main>
);
}