diff --git a/app/components/Header.vue b/app/components/Header.vue index ba024a2..3b07a04 100644 --- a/app/components/Header.vue +++ b/app/components/Header.vue @@ -26,15 +26,15 @@ onUnmounted(() => { } }) +const { isAuthenticated, user, logout } = useAuth() +const panelLabel = computed(() => isAdmin(user.value?.role) ? 'Pannello' : 'Dashboard') + const navLinks = [ { name: 'Home', path: '/' }, - { name: 'Fai una segnalazione', path: '/reports/new' }, + ...(isCitizen(user.value?.role) ? [{ name: 'Fai una segnalazione', path: '/reports/new' }] : []), { name: 'Esplora i dati', path: '/open-data' }, { name: 'Come funziona', path: '/info' } ] - -const { isAuthenticated, user, logout } = useAuth() -const panelLabel = computed(() => isAdmin(user.value?.role) ? 'Pannello' : 'Dashboard')