whisper-money/resources/js/pages
Víctor Falcón aa3b811027
refactor(js): extract shared getCsrfToken util (#475)
## What

Same XSRF-TOKEN cookie-parsing snippet was duplicated inline in **12
files** (some as local `getCsrfToken()` copies, some inline
`decodeURIComponent(...)` blocks).

Extracted to single util: `resources/js/lib/csrf.ts`, with vitest
coverage.

## Why

Part of duplication-removal series — PRs that mostly delete code.

## Stats

- App code: **-89 / +23 lines**
- 12 files now import one shared util
- New: `lib/csrf.ts` (8 lines) + `lib/csrf.test.ts`

## Checks

- `bun run test` — 154 pass (3 new)
- `bun run lint` — clean (1 pre-existing warning in chart.tsx)
- `bun run format` — applied
- `tsc --noEmit` — 59 pre-existing errors on main, same 59 on branch
(none introduced)
2026-06-03 17:26:09 +02:00
..
Accounts feat(accounts): show 50 transactions per page and link to full list (#459) 2026-05-30 18:48:21 +02:00
auth fix(register): don't block signup on unrecognized browser timezone (#462) 2026-06-01 09:03:15 +02:00
budgets feat(budgets): track multiple categories and labels per budget (#466) 2026-06-01 12:32:23 +02:00
cashflow feat(cashflow): rework summary cards into net + saved/invested (#465) 2026-06-01 11:37:28 +02:00
onboarding Hide stale onboarding plan warning (#360) 2026-05-06 15:10:32 +01:00
open-banking feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
settings refactor(js): extract shared getCsrfToken util (#475) 2026-06-03 17:26:09 +02:00
subscription fix: allow managing canceled connections (#417) 2026-05-22 10:52:50 +01:00
transactions feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02: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): redirect signed-in users (#429) 2026-05-25 20:28:45 +02:00