Skip to content

Commit

Permalink
Fix logged in user stall (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically authored Apr 22, 2023
1 parent 4be6b11 commit d9b3ba0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 0 additions & 7 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 4 additions & 2 deletions pages/[type]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@
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)"
>
<HeartIcon aria-hidden="true" />
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)"
>
Expand Down Expand Up @@ -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 ||
!(
Expand Down
3 changes: 1 addition & 2 deletions plugins/2.state.js
Original file line number Diff line number Diff line change
@@ -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))
Expand Down

0 comments on commit d9b3ba0

Please sign in to comment.