Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/frontend/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,27 +378,15 @@ const router = createBrowserRouter(
{/* Public policy routes */}
<Route
path="terms-of-service"
element={
<Suspense fallback={<LoadingPage />}>
<TermsOfServicePage />
</Suspense>
}
element={<TermsOfServicePage />}
/>
Comment on lines 379 to 382

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore Suspense boundary for lazy policy pages

These policy routes still render React.lazy components (TermsOfServicePage, PrivacyPolicyPage, RefundPolicyPage are declared with lazy(...) at the top of this file). With the Suspense wrappers removed, navigating to these routes will throw at runtime (“a component suspended while rendering, but no fallback UI was specified”) because this branch of the route tree only has ContextWrapper/Outlet and no ancestor Suspense boundary. This means public policy pages will fail to render in production unless a higher-level Suspense is reintroduced.

Useful? React with 👍 / 👎.

<Route
path="privacy-policy"
element={
<Suspense fallback={<LoadingPage />}>
<PrivacyPolicyPage />
</Suspense>
}
element={<PrivacyPolicyPage />}
/>
<Route
path="refund-policy"
element={
<Suspense fallback={<LoadingPage />}>
<RefundPolicyPage />
</Suspense>
}
element={<RefundPolicyPage />}
/>

{/* Auth routes */}
Expand Down
Loading