From c5a9bd081c8d265a0ba1c6789f0c772e73bbaaa3 Mon Sep 17 00:00:00 2001 From: Thibault Pouch Date: Tue, 3 Mar 2026 09:48:47 +0100 Subject: [PATCH] refactor: simplify DevRoleSwitcher by removing role selection and unused variables --- .../src/components/shared/DevRoleSwitcher.tsx | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/nest-front/src/components/shared/DevRoleSwitcher.tsx b/nest-front/src/components/shared/DevRoleSwitcher.tsx index a4627b8..9520c3c 100644 --- a/nest-front/src/components/shared/DevRoleSwitcher.tsx +++ b/nest-front/src/components/shared/DevRoleSwitcher.tsx @@ -1,8 +1,7 @@ import { useAuth } from '../../contexts/AuthContext'; -import type { UserRole } from '../../types'; /** - * Developer-only overlay to quickly switch user roles for testing. + * Developer-only overlay to quickly log in as test accounts. * Only visible in development mode. */ export function DevRoleSwitcher() { @@ -12,9 +11,8 @@ export function DevRoleSwitcher() { } function DevRoleSwitcherInner() { - const { user, isAuthenticated, devSetRole, login, logout } = useAuth(); + const { user, isAuthenticated, login, logout } = useAuth(); - const ROLES: UserRole[] = ['user', 'dev', 'com']; const DEV_ACCOUNTS = [ { label: 'Dev/Admin (Kestrel)', email: 'kestrel@crowmate.dev' }, { label: 'Com Staff (Vesper)', email: 'vesper@crowmate.dev' }, @@ -48,30 +46,10 @@ function DevRoleSwitcherInner() {
Logged as: {user?.username}
-
+
Role: {user?.role}
-
- {ROLES.map((r) => ( - - ))} -
-