whisper-money/resources/js/pages/settings
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
..
account.tsx feat(settings): let users disable bank transactions email (#472) 2026-06-02 12:24:39 +02:00
accounts.tsx feat(real-estate): auto-calculate revaluation % and generate historical balances (#253) 2026-04-15 12:18:33 +00:00
appearance.tsx feat(i18n): add localization test and fix missing Spanish translations (#174) 2026-03-01 12:32:39 +00:00
automation-rules.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
billing.tsx fix(pricing): update final release prices (#288) 2026-04-15 14:49:02 +01:00
categories.tsx feat(cashflow): add savings and period views (#424) 2026-05-25 16:41:00 +02:00
connections.test.tsx fix(connections): show expired reconnect (#407) 2026-05-20 13:13:13 +01:00
connections.tsx refactor(js): extract shared getCsrfToken util (#475) 2026-06-03 17:26:09 +02:00
delete-account.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
labels.tsx fix: Add gap between filter/create button on mobile settings pages (#115) 2026-02-12 20:50:05 +01:00
password.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
two-factor.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00