Files
supabase/apps
Alan Daniel de8072665a fix(www, common): contain SSR bailouts in /pricing provider tree
Two changes that together remove BAILOUT_TO_CLIENT_SIDE_RENDERING from
the rendered HTML so crawlers and LLM bots see the actual pricing
content (FE-3079).

1. useThemeSandbox: hoist `useState` and `useEffect` above the
   environment check. The previous `if (typeof window === 'undefined' ||
   IS_PROD) return null` ran before any hooks, so on preview deploys
   (IS_PROD=false) the server returned null with 0 hooks while the
   client called 2 hooks — a Rules of Hooks violation that React
   converts into a CSR bailout. Hooks now run unconditionally; all side
   effects are gated inside the effect, which never runs during SSR.

2. providers.tsx: wrap each side-effect-y sibling
   (TelemetryTagManager, Toaster, WwwCommandMenu, PageTelemetry,
   DevToolbar) in its own <Suspense> boundary. If any of them does
   trigger a bailout (e.g. a transitive dependency reading
   useSearchParams without a Suspense boundary), it's contained to that
   subtree instead of propagating up past `{children}` and hiding the
   page from the SSR'd HTML.
2026-04-29 13:27:47 -04:00
..
2026-04-29 11:12:54 +00:00