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