whisper-money/resources/js/pages
Víctor Falcón b1709b714e
fix(onboarding): guard window access in SSR (#351)
## Problem

Production SSR crashes repeatedly when rendering the Onboarding page:

```
ReferenceError: window is not defined
  at Onboarding (/app/bootstrap/ssr/assets/index-BEtdcHXd.js:2295)
```

The `useMemo` reading `?step=` from the URL accessed
`window.location.search` directly, which fails during Inertia SSR.

Observed ~7+ times in production logs between 18:35–21:37 UTC.

## Fix

Add `typeof window === 'undefined'` guard before reading the URL.
Returns `undefined` on the server so the step initializer falls back to
default behavior; client hydration re-runs and reads the URL.

## Related logs

- `Inertia\Ssr\SsrException` — Onboarding page
- Other SSR-touching files (`welcome.tsx`, `auth/login.tsx`) verified
safe (window inside `useEffect` or already guarded).
2026-05-05 08:45:44 +01:00
..
Accounts feat(settings): centralize currency options and split profile/account support (#256) 2026-04-02 19:23:10 +02:00
auth feat(leads): cohort-based launch invitations with per-user Stripe coupons (#333) 2026-04-30 15:10:28 +01:00
budgets feat(mobile): add scroll-aware back button on detail pages (#194) 2026-03-03 19:21:49 +00:00
cashflow fix(cashflow): read period from server props instead of window (#302) 2026-04-17 10:27:49 +01:00
onboarding fix(onboarding): guard window access in SSR (#351) 2026-05-05 08:45:44 +01:00
open-banking feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
settings feat(open-banking): remove feature flag gating (#297) 2026-04-17 10:20:05 +02:00
subscription feat(pricing): update landing page pricing table (#207) 2026-03-05 13:39:52 +00:00
transactions fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331) 2026-04-24 17:58:26 +01:00
waitlist feat: verify waitlist leads (#285) 2026-04-14 11:26:01 +01:00
dashboard.tsx feat(settings): centralize currency options and split profile/account support (#256) 2026-04-02 19:23:10 +02:00
privacy.tsx Remove plaintext-transactions feature flag & E2E references (#116) 2026-02-13 11:10:21 +01:00
terms.tsx Replace E2E encryption mentions with privacy-first messaging (#124) 2026-02-14 16:59:50 +01:00
welcome.tsx feat(landing): add signed auth links (#312) 2026-04-21 08:28:59 +01:00