diff --git a/components/publish/PublishAttachment.vue b/components/publish/PublishAttachment.vue index c09dc72a..35adc068 100644 --- a/components/publish/PublishAttachment.vue +++ b/components/publish/PublishAttachment.vue @@ -31,11 +31,11 @@ const toggleApply = () => { v-if="removable" :aria-label="$t('attachment.remove_label')" hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer - :class="[isHydrated.value && isSmallScreen ? '' : 'op-0 group-hover:op-100hover:']" + :class="[isHydrated && isSmallScreen ? '' : 'op-0 group-hover:op-100hover:']" mix-blend-difference @click="$emit('remove')" > -
+
diff --git a/composables/hydration.ts b/composables/hydration.ts index 84ead784..98fad034 100644 --- a/composables/hydration.ts +++ b/composables/hydration.ts @@ -1,14 +1,8 @@ -export const isHydrated = computed(() => { - if (process.server) - return { value: false } +export const isHydrated = ref(false) +if (!process.server) { const nuxtApp = useNuxtApp() - if (!nuxtApp.isHydrating) - return { value: false } - - const hydrated = ref(false) nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { - hydrated.value = true + isHydrated.value = true }) - return hydrated -}) +} diff --git a/layouts/default.vue b/layouts/default.vue index 390b767b..e3b19dbe 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -45,8 +45,8 @@ const wideLayout = computed(() => route.meta.wideLayout ?? false)
- - + +