refactor(auth): centralize role checks into utility
Removed direct user role string checks and replaced with type-safe utils.
This commit is contained in:
@@ -34,7 +34,7 @@ const navLinks = [
|
||||
]
|
||||
|
||||
const { isAuthenticated, user, logout } = useAuth()
|
||||
const panelLabel = computed(() => user.value?.role?.toUpperCase() === 'ADMIN' ? 'Pannello' : 'Dashboard')
|
||||
const panelLabel = computed(() => isAdmin(user.value?.role) ? 'Pannello' : 'Dashboard')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user