Finally (???) fix the hydration issues with a markdown renderer in SSR

This commit is contained in:
2024-09-09 16:32:11 +02:00
parent cbef6d1289
commit 6550042751
4 changed files with 13 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
<template>
<HoverPopup @before-show="fetch" :class="[{'is-loaded': fetched}, file?.type === 'Markdown' ? 'overflow-auto' : 'overflow-hidden']">
<template #content>
<Suspense>
<Suspense suspensible>
<div v-if="pending" class="loading w-[550px] h-[450px]"></div>
<template v-else-if="!!file">
<div v-if="file.type === 'Markdown'" class="p-6 ms-6">
@@ -22,7 +22,7 @@
</div>
</Suspense>
</template>
<slot></slot>
<template #default><slot name="default"></slot></template>
</HoverPopup>
</template>