diff --git a/frontend/components/global/SideModal.vue b/frontend/components/global/SideModal.vue index eaa40a0..516e074 100644 --- a/frontend/components/global/SideModal.vue +++ b/frontend/components/global/SideModal.vue @@ -9,38 +9,18 @@ defineProps(); // state -const { $gsap: gsap } = useNuxtApp(); - const isSideShow = ref(false); -const tl = gsap.timeline(); -// methods - -const enterAnimation = () => { - tl.to("#side-overlay", { opacity: 1 }).fromTo( - "#side-content", - { - right: "-100%", - opacity: 0, - }, - { - right: 0, - opacity: 1, - }, - "<" - ); -}; - -const closeAnimation = () => { - tl.reverse().then(() => (isSideShow.value = false)); -}; +const isLocked = useScrollLock(window); // watch watch( () => isSideShow.value, (newValue) => { - newValue ? enterAnimation() : null; + if (newValue) { + isLocked.value = true; + } } ); @@ -51,38 +31,46 @@ watch(
-
- -
+