From 6d3315c71f40469c5fd123b81290d962ef546ccf Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Thu, 27 Aug 2026 13:06:41 -0400 Subject: [PATCH] fix nook subdomain routing --- src/routes/checkout.tsx | 21 +++++++++++++++++++++ src/routes/index.tsx | 4 ++++ src/routes/privacy.tsx | 6 ++++-- src/routes/success.tsx | 21 +++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/routes/checkout.tsx create mode 100644 src/routes/success.tsx diff --git a/src/routes/checkout.tsx b/src/routes/checkout.tsx new file mode 100644 index 0000000..16ea384 --- /dev/null +++ b/src/routes/checkout.tsx @@ -0,0 +1,21 @@ +import { Switch, Match } from "solid-js"; +import { useSite } from "~/context/SiteContext"; +import NotFound from "./[...404]"; +import NookCheckout from "./nook/checkout"; + +/** + * Host-aware checkout route — `/checkout`. + * + * Only The Nook has a checkout flow; all other sites fall back to 404. + * Mirrors the dispatch pattern in `src/routes/index.tsx`. + */ +export default function CheckoutPage() { + const site = useSite(); + return ( + }> + + + + + ); +} diff --git a/src/routes/index.tsx b/src/routes/index.tsx index b2b8532..99c3909 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -7,6 +7,7 @@ import NessaLanding from "./nessa"; import LineageLanding from "./lineage"; import GazeLanding from "./gaze"; import InputHaloLanding from "./inputhalo"; +import NookLanding from "./nook"; /** * Root route handler. @@ -44,6 +45,9 @@ export default function Home(): JSX.Element { + + + ); } diff --git a/src/routes/privacy.tsx b/src/routes/privacy.tsx index e2a0d6c..dd28a64 100644 --- a/src/routes/privacy.tsx +++ b/src/routes/privacy.tsx @@ -4,8 +4,7 @@ import NotFound from "./[...404]"; import NessaPrivacyPolicy from "./nessa/privacy"; import LineagePrivacyPolicy from "./lineage/privacy"; import GazePrivacyPolicy from "./gaze/privacy"; -import InputHaloPrivacyPolicy from "./inputhalo/privacy"; - +import NookPrivacyPolicy from "./nook/privacy"; /** * Host-aware privacy policy route — `/privacy`. * @@ -41,6 +40,9 @@ export default function PrivacyPage() { + + + ); } diff --git a/src/routes/success.tsx b/src/routes/success.tsx new file mode 100644 index 0000000..e999bdb --- /dev/null +++ b/src/routes/success.tsx @@ -0,0 +1,21 @@ +import { Switch, Match } from "solid-js"; +import { useSite } from "~/context/SiteContext"; +import NotFound from "./[...404]"; +import NookSuccess from "./nook/success"; + +/** + * Host-aware success route — `/success`. + * + * Only The Nook has a post-checkout success page; all other sites fall + * back to 404. Mirrors the dispatch pattern in `src/routes/index.tsx`. + */ +export default function SuccessPage() { + const site = useSite(); + return ( + }> + + + + + ); +}