fix(onboarding): isolate cached routing state per request (#459)
This commit is contained in:
parent
8a728563d4
commit
189d5bfa1f
@ -21,6 +21,10 @@ const clampStep = (step: number) =>
|
|||||||
Math.min(Math.max(0, Math.trunc(step)), ONBOARDING_LAST_STEP);
|
Math.min(Math.max(0, Math.trunc(step)), ONBOARDING_LAST_STEP);
|
||||||
|
|
||||||
export const Route = createFileRoute("/_authenticated/onboarding/")({
|
export const Route = createFileRoute("/_authenticated/onboarding/")({
|
||||||
|
// The app renders inside ClientOnly, and this guard reads account-scoped data
|
||||||
|
// through a module-scoped query client. Keep it out of server requests so one
|
||||||
|
// worker isolate cannot reuse another account's cached onboarding state.
|
||||||
|
ssr: false,
|
||||||
// Step lives in the URL so it survives refresh and works with back/forward.
|
// Step lives in the URL so it survives refresh and works with back/forward.
|
||||||
validateSearch: (search: Record<string, unknown>): { step: number } => {
|
validateSearch: (search: Record<string, unknown>): { step: number } => {
|
||||||
const raw = Number(search.step);
|
const raw = Number(search.step);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user