Skip to content

Commit

Permalink
only show lazy postmeta after mount
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyjassin committed Nov 25, 2024
1 parent 66e4aa5 commit 8bdd4c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/blog/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<template #default>
<main>
<div class="mb-[-30px]">
<LazyPostMeta />
<LazyPostMeta v-if="isMounted" />
</div>
<ContentLoader />
<hr />
<RelatedPosts v-if="showRelated" />
<RelatedPosts v-if="isMounted" />
</main>
</template>
<template #fallback>
Expand All @@ -27,11 +27,11 @@
</template>

<script setup lang="ts">
const showRelated = ref(false)
const isMounted = ref(false)
// Only show after main content loads
onMounted(() => {
showRelated.value = true
isMounted.value = true
})
const route = useRoute()
Expand Down

0 comments on commit 8bdd4c4

Please sign in to comment.