From 679dc42251235642f4fe8d7580944c9982f15b8d Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 27 Oct 2023 15:08:28 -0400 Subject: [PATCH] feat: remove useSafeOnMounted workaround Suspense + Animation issue was fixed https://github.com/vuejs/core/issues/5844 --- src/components/Cursor.vue | 5 +---- src/components/Gallery/Grid.vue | 7 ++----- src/composables/useSafeOnMounted.ts | 31 ----------------------------- 3 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 src/composables/useSafeOnMounted.ts diff --git a/src/components/Cursor.vue b/src/components/Cursor.vue index 9db07575..42df0ac4 100644 --- a/src/components/Cursor.vue +++ b/src/components/Cursor.vue @@ -57,9 +57,7 @@ const refreshItems = () => { focusMouse(cursor, newTexts) } -const rootElement = ref(null) - -useSafeOnMounted(rootElement, async () => { +onMounted(() => { if (ScrollTrigger.isTouch !== 1) { const cursor = document.querySelector('#cursor') as HTMLElement cursor.style.backgroundColor = 'transparent' @@ -122,7 +120,6 @@ onNuxtReady(() => {