feat(TopBar): add user settings & logout btn and finish logout function
refactor(auth): rename login-token to token for consistency Update all token references from 'login-token' to 'token' across the application. Also enhance TopBar with user menu functionality including logout and settings options. - Standardize token cookie name for better maintainability - Add dropdown menu to TopBar with logout functionality - Implement click-outside behavior for menu - Improve TopBar styling and user interaction
This commit is contained in:
@@ -65,7 +65,7 @@ const router = createRouter({
|
||||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const token = getCookie('login-token');
|
||||
const token = getCookie('token');
|
||||
const userType = getCookie('user-type');
|
||||
|
||||
if (to.meta.requiresAuth && !token) {
|
||||
|
||||
Reference in New Issue
Block a user