diff --git a/client/src/components/NavBar.vue b/client/src/components/NavBar.vue index a3adf1a..90eb1f3 100644 --- a/client/src/components/NavBar.vue +++ b/client/src/components/NavBar.vue @@ -19,6 +19,13 @@ export default { async mounted() { await this.getUserInfo(); }, + watch: { + loggedIn: { + handler() { + this.getUserInfo(); + } + } + }, methods: { async getUserInfo() { const res = await fetch(`${import.meta.env.VITE_BASE_API_URL}/user`, {