From e97c3bcf836c1d166d1a3297fc905df6181af933 Mon Sep 17 00:00:00 2001 From: Flycro Date: Thu, 21 Mar 2024 02:41:02 +0100 Subject: [PATCH] fix: Hopefully fix SSR in Navigation #2 --- nuxt/components/{Navigation.vue => Navigation.client.vue} | 2 -- nuxt/components/{UserDropdown.vue => UserDropdown.client.vue} | 2 -- 2 files changed, 4 deletions(-) rename nuxt/components/{Navigation.vue => Navigation.client.vue} (94%) rename nuxt/components/{UserDropdown.vue => UserDropdown.client.vue} (92%) diff --git a/nuxt/components/Navigation.vue b/nuxt/components/Navigation.client.vue similarity index 94% rename from nuxt/components/Navigation.vue rename to nuxt/components/Navigation.client.vue index 00436c4..56f8059 100644 --- a/nuxt/components/Navigation.vue +++ b/nuxt/components/Navigation.client.vue @@ -22,8 +22,6 @@ const links: NavigationTree[] = [ }, ] -await useAsyncData('user', () => authStore.fetchUser()) - if (authStore.user?.roles.includes('admin')) { links.push({ label: 'Admin', diff --git a/nuxt/components/UserDropdown.vue b/nuxt/components/UserDropdown.client.vue similarity index 92% rename from nuxt/components/UserDropdown.vue rename to nuxt/components/UserDropdown.client.vue index ddef9fe..6a24e06 100644 --- a/nuxt/components/UserDropdown.vue +++ b/nuxt/components/UserDropdown.client.vue @@ -11,8 +11,6 @@ const links = [{ icon: 'i-heroicons-arrow-left-on-rectangle', }] -await useAsyncData('user', () => authStore.fetchUser()) - if (authStore.user?.roles.includes('admin')) { links.push({ label: 'Admin',