nook: dispatch /agents, /changelog and /faq at the top level

The new subdomain pages 404ed in production: the vercel.json host
rewrites do not fire — SSR sees /agents, never /nook/agents — so pages
that only exist under src/routes/nook/* are unreachable from the
subdomain. Every pre-existing subdomain surface survives on top-level
host-dispatch routes (index, privacy, checkout, deletion), which is why
only the new pages broke. Give the three pages the same dispatch,
falling back to 404 on other sites.

Tests: full bun test run unchanged (539 pass); vinxi build clean.

Issue: FRE-12
This commit is contained in:
2026-10-04 23:33:11 -04:00
parent b41cf83879
commit 35986239c1
3 changed files with 70 additions and 0 deletions

23
src/routes/faq.tsx Normal file
View File

@@ -0,0 +1,23 @@
import { Switch, Match } from "solid-js";
import { useSite } from "~/context/SiteContext";
import NotFound from "./[...404]";
import NookFaqPage from "./nook/faq";
/**
* Host-aware FAQ route — `/faq`.
*
* The FAQ is a Nook-subdomain surface; all other sites fall back to 404.
* Mirrors the dispatch pattern in `src/routes/index.tsx` and
* `src/routes/checkout.tsx` — production does not apply the vercel.json
* host rewrites (SSR sees `/faq`, never `/nook/faq`).
*/
export default function FaqPage() {
const site = useSite();
return (
<Switch fallback={<NotFound />}>
<Match when={site().id === "nook"}>
<NookFaqPage />
</Match>
</Switch>
);
}