## 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) |
||
|---|---|---|
| .. | ||
| connect-account-dialog.tsx | ||
| connect-account-inline.tsx | ||
| connection-status-badge.tsx | ||
| disconnect-dialog.tsx | ||
| update-credentials-dialog.tsx | ||
| upgrade-connection-dialog.tsx | ||