fix: use uppercase role values in Header component switch statement
Change role case values from lowercase to uppercase to match User type: - 'admin' → 'ADMIN' - 'employee' → 'EMPLOYEE' The User type only defines uppercase role values. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a7c7b705df
commit
63fbfc4f69
|
|
@ -34,9 +34,9 @@ export default function Header() {
|
|||
const getDashboardRoute = () => {
|
||||
if (!user) return ROUTES.HOME;
|
||||
switch (user.role) {
|
||||
case 'admin':
|
||||
case 'ADMIN':
|
||||
return ROUTES.ADMIN_DASHBOARD;
|
||||
case 'employee':
|
||||
case 'EMPLOYEE':
|
||||
return ROUTES.EMPLOYEE_DASHBOARD;
|
||||
default:
|
||||
return ROUTES.CLIENT_DASHBOARD;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user