From 2d4e30ea50f91b146b8af4ac7eb7d2195eec78eb Mon Sep 17 00:00:00 2001 From: happhee Date: Fri, 18 Oct 2024 20:09:28 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20home=EC=9C=BC=EB=A1=9C=20=ED=83=AD=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=EC=8B=9C=20,=20=EC=8A=A4=ED=81=AC=EB=A1=A4?= =?UTF-8?q?=20=EC=95=88=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/common/LayoutWrapper.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/common/LayoutWrapper.tsx b/components/common/LayoutWrapper.tsx index df147c2..e6b2266 100644 --- a/components/common/LayoutWrapper.tsx +++ b/components/common/LayoutWrapper.tsx @@ -1,8 +1,8 @@ -import React, { ReactNode, useEffect, useRef, useState } from 'react'; -import { Header, Footer, FloatingButton } from 'components/common'; -import { useRouter } from 'next/router'; +import { FloatingButton, Footer, Header } from 'components/common'; import { IntroSection } from 'components/home'; import PATH from 'constants/path'; +import { useRouter } from 'next/router'; +import { ReactNode, useEffect, useRef } from 'react'; import smoothscroll from 'smoothscroll-polyfill'; // Safari 에서 smooth 효과 적용 interface LayoutWrapperProps { @@ -51,8 +51,10 @@ function LayoutWrapper({ children }: LayoutWrapperProps) { }; outerRefCurrent.addEventListener('wheel', wheelAnimationHandler); - return () => + return () => { outerRefCurrent.removeEventListener('wheel', wheelAnimationHandler); + scrollEventRef.current = false; + }; } }, [asPath]);