Scrum4Me/components/shared
Madhura68 5cbf543c16 fix: call logoutAction directly via useTransition instead of form-ref submit
De form-ref-dance werkte niet betrouwbaar in de huidige base-ui:
- onSelect vuurde requestSubmit() op een hidden form
- Form zat eerst binnen DropdownMenuContent (form geunmount → ref null)
- Form daarna naar top-level verplaatst — vuurde nog steeds geen request af,
  vermoedelijk doordat onSelect in deze base-ui-build niet (consistent) een
  click-event genereerde dat de form-API trigger'de

Vervang door directe call: Server Actions kunnen sinds Next.js 14 als async
functie worden aangeroepen vanuit Client Components. useTransition voorkomt
dat de UI bevriest tijdens de redirect.

Naast onSelect ook onClick als veiligheid voor het geval base-ui later weer
van event-prop wisselt — beide handlers wijzen naar dezelfde idempotente
function (handleLogout via startTransition).

Pendingstate ('Uitloggen…' label, disabled item) zodat dubbele klikken niet
dubbele logoutAction-calls afvuren.

Quality gates: lint 0 errors, tsc clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 23:40:42 +02:00
..
activate-product-button.tsx feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
alert-toast.tsx feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
app-icon.tsx chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
code-badge.tsx feat(ST-507): add code-helpers and CodeBadge component 2026-04-26 20:36:33 +02:00
demo-tooltip.tsx feat: ST-601-ST-612 M6 polish, beveiliging en launch-ready 2026-04-24 12:36:23 +02:00
min-width-banner.tsx feat: ST-601-ST-612 M6 polish, beveiliging en launch-ready 2026-04-24 12:36:23 +02:00
nav-bar.tsx feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
panel-nav-bar.tsx feat: ST-101-ST-110 M1 producten, PBI backlog, iconen en PWA manifest 2026-04-24 11:33:47 +02:00
priority-select.tsx feat(ST-108/ST-208): replace inline forms with PBI and story dialogs 2026-04-25 22:53:26 +02:00
set-current-product.tsx feat: show active product name in navbar, links to product page 2026-04-26 17:56:50 +02:00
status-bar.tsx feat: demo-gebruiker krijgt read-only toegang tot actieve sprint 2026-04-24 17:17:41 +02:00
story-log.tsx feat: ST-401-ST-410 M4 REST API, tokenbeleer en activiteitenlog 2026-04-24 11:56:29 +02:00
user-avatar.tsx feat(ST-351): add UserAvatar component and /api/users/[id]/avatar route 2026-04-26 16:15:56 +02:00
user-menu.tsx fix: call logoutAction directly via useTransition instead of form-ref submit 2026-04-27 23:40:42 +02:00