Set markdown renderer as client only to fix hydration issues. Will later try to improve it and set it back as normal

This commit is contained in:
2024-09-09 14:43:53 +02:00
parent 09f4f3c482
commit cbef6d1289
9 changed files with 41 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<template>
<Teleport to="#teleports" v-if="display">
<div :class="$attrs.class" class="absolute border-2 border-light-35 dark:border-dark-35 max-w-[550px] max-h-[450px] bg-light-0 dark:bg-dark-0 text-light-100 dark:text-dark-100" :style="pos"
<Teleport to="#teleports">
<div v-show="display" :class="$attrs.class" class="absolute border-2 border-light-35 dark:border-dark-35 max-w-[550px] max-h-[450px] bg-light-0 dark:bg-dark-0 text-light-100 dark:text-dark-100" :style="pos"
@mouseenter="debounce(show, 250)" @mouseleave="debounce(() => { emit('beforeHide'); display = false }, 250)">
<slot name="content"></slot>
</div>

View File

@@ -1,7 +1,7 @@
<template>
<template
v-if="content && content.length > 0">
<Suspense>
<Suspense :timeout="0">
<MarkdownRenderer #default :key="key" v-if="node" :node="node"></MarkdownRenderer>
<template #fallback><div class="loading"></div></template>
</Suspense>