Fix logged in user stall (#1114)

This commit is contained in:
Geometrically 2023-04-22 09:59:46 -07:00 committed by GitHub
parent 4be6b11c1e
commit d9b3ba0ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 11 deletions

View File

@ -99,13 +99,6 @@ export default defineNuxtConfig({
type: 'font/woff2',
crossorigin: true,
},
{
rel: 'preload',
href: 'https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19',
as: 'font',
type: 'font/woff2',
crossorigin: true,
},
{
rel: 'icon',
type: 'image/x-icon',

View File

@ -282,7 +282,7 @@
Report
</button>
<button
v-if="!$user.value.follows.find((x) => x.id === project.id)"
v-if="!user.follows.find((x) => x.id === project.id)"
class="iconified-button"
@click="userFollowProject(project)"
>
@ -290,7 +290,7 @@
Follow
</button>
<button
v-if="$user.value.follows.find((x) => x.id === project.id)"
v-if="user.follows.find((x) => x.id === project.id)"
class="iconified-button"
@click="userUnfollowProject(project)"
>
@ -747,6 +747,8 @@ import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
const data = useNuxtApp()
const route = useRoute()
const user = await useUser()
if (
!route.params.id ||
!(

View File

@ -1,11 +1,10 @@
export default defineNuxtPlugin(async (nuxtApp) => {
const authStore = await useAuth()
const userStore = await useUser(true)
await useUser()
const cosmeticsStore = useCosmetics()
const tagsStore = useTags()
nuxtApp.provide('auth', authStore.value)
nuxtApp.provide('user', userStore)
nuxtApp.provide('cosmetics', cosmeticsStore.value)
nuxtApp.provide('tag', tagsStore.value)
nuxtApp.provide('notify', (notif) => addNotification(notif))