From f1b0befd806018a16980100db25b0d2de37330b3 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 22 Dec 2022 02:27:16 +0000 Subject: [PATCH] fix: make `isHydrated` export `.value` always --- components/main/MainContent.vue | 2 +- components/publish/PublishAttachment.vue | 4 ++-- composables/hydration.ts | 4 ++-- layouts/default.vue | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/main/MainContent.vue b/components/main/MainContent.vue index 82783a54..eb88bc10 100644 --- a/components/main/MainContent.vue +++ b/components/main/MainContent.vue @@ -22,7 +22,7 @@ defineProps<{
- +
diff --git a/components/publish/PublishAttachment.vue b/components/publish/PublishAttachment.vue index eceb4f30..b8dea2e5 100644 --- a/components/publish/PublishAttachment.vue +++ b/components/publish/PublishAttachment.vue @@ -27,11 +27,11 @@ const description = ref(props.attachment.description ?? '') v-if="removable" aria-label="Remove attachment" hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer - :class="[isHydrated && isSmallScreen ? '' : 'op-0 group-hover:op-100hover:']" + :class="[isHydrated.value && isSmallScreen ? '' : 'op-0 group-hover:op-100hover:']" mix-blend-difference @click="$emit('remove')" > -
+
diff --git a/composables/hydration.ts b/composables/hydration.ts index 3909d275..84ead784 100644 --- a/composables/hydration.ts +++ b/composables/hydration.ts @@ -1,10 +1,10 @@ export const isHydrated = computed(() => { if (process.server) - return false + return { value: false } const nuxtApp = useNuxtApp() if (!nuxtApp.isHydrating) - return false + return { value: false } const hydrated = ref(false) nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { diff --git a/layouts/default.vue b/layouts/default.vue index 79142bcd..08d795f1 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -44,8 +44,8 @@
- - + +