Skip to content

Commit d9b3ba0

Browse files
Fix logged in user stall (#1114)
1 parent 4be6b11 commit d9b3ba0

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

nuxt.config.js

-7
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ export default defineNuxtConfig({
9999
type: 'font/woff2',
100100
crossorigin: true,
101101
},
102-
{
103-
rel: 'preload',
104-
href: 'https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19',
105-
as: 'font',
106-
type: 'font/woff2',
107-
crossorigin: true,
108-
},
109102
{
110103
rel: 'icon',
111104
type: 'image/x-icon',

pages/[type]/[id].vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@
282282
Report
283283
</button>
284284
<button
285-
v-if="!$user.value.follows.find((x) => x.id === project.id)"
285+
v-if="!user.follows.find((x) => x.id === project.id)"
286286
class="iconified-button"
287287
@click="userFollowProject(project)"
288288
>
289289
<HeartIcon aria-hidden="true" />
290290
Follow
291291
</button>
292292
<button
293-
v-if="$user.value.follows.find((x) => x.id === project.id)"
293+
v-if="user.follows.find((x) => x.id === project.id)"
294294
class="iconified-button"
295295
@click="userUnfollowProject(project)"
296296
>
@@ -747,6 +747,8 @@ import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
747747
const data = useNuxtApp()
748748
const route = useRoute()
749749
750+
const user = await useUser()
751+
750752
if (
751753
!route.params.id ||
752754
!(

plugins/2.state.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
export default defineNuxtPlugin(async (nuxtApp) => {
22
const authStore = await useAuth()
3-
const userStore = await useUser(true)
3+
await useUser()
44
const cosmeticsStore = useCosmetics()
55
const tagsStore = useTags()
66

77
nuxtApp.provide('auth', authStore.value)
8-
nuxtApp.provide('user', userStore)
98
nuxtApp.provide('cosmetics', cosmeticsStore.value)
109
nuxtApp.provide('tag', tagsStore.value)
1110
nuxtApp.provide('notify', (notif) => addNotification(notif))

0 commit comments

Comments
 (0)