From 974c84fdb2c08d3fc914d6b0641fdfefe7e2a106 Mon Sep 17 00:00:00 2001 From: mono Date: Sat, 14 Mar 2026 22:36:57 -0500 Subject: [PATCH] #29 fix: fetch user data on route change after login --- src/components/NavBar.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 98c2559..94fa7e5 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -109,14 +109,17 @@ this.fetchUser(); } }, - watch: { - group () { - this.drawer = false - }, - $route() { - this.checkAuth(); - }, - }, + watch: { + group () { + this.drawer = false + }, + $route() { + this.checkAuth(); + if (this.isAuthenticated && !this.user) { + this.fetchUser(); + } + }, + }, methods: { checkAuth() { this.isAuthenticated = AuthService.isAuthenticated();