import { PageSection } from "../components/PageSection.tsx"; import { DemoBox } from "../components/homepage/DemoBox.tsx"; import { df } from "../utils/state.ts"; export const handler = df.handlers({ GET(ctx) { const url = new URL(ctx.req.url); const search = new URLSearchParams(url.search); const vote = search.get("vote"); return { data: { vote } }; }, }); export default df.page(function ThanksForSubscribing( props, ) { 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
); });