import { PageSection } from "$fresh/www/components/PageSection.tsx"; import { DemoBox } from "$fresh/www/components/homepage/DemoBox.tsx"; import { Head } from "$fresh/runtime.ts"; import { Handlers, PageProps } from "$fresh/server.ts"; export const handler: Handlers = { GET(req, ctx) { const url = new URL(req.url); const search = new URLSearchParams(url.search); const vote = search.get("vote"); return ctx.render({ vote }); }, }; export default function ThanksForSubscribing( props: PageProps & { vote?: string }, ) { const vote = props?.data?.vote ? props.data.vote.replaceAll(/-/g, " ") : null; return ( <>

{vote ? `Thanks for voting for ${vote}!` : `Form submitted successfully`}

That was all handled server-side, with{" "} no client-side JavaScript! Nifty, huh?

…Anyway, you probably want to{" "} go back now.

Back home
); }