From ea9803d4427152707e9d51d132758efed3d391ff Mon Sep 17 00:00:00 2001 From: "focp212@naver.com" Date: Mon, 22 Sep 2025 16:57:03 +0900 Subject: [PATCH] =?UTF-8?q?=ED=92=8B=ED=84=B0=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=20=EC=9B=80=EC=A7=81=EC=9E=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/navigation/footer.tsx | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/widgets/navigation/footer.tsx b/src/widgets/navigation/footer.tsx index 5f2a5f7..95da813 100644 --- a/src/widgets/navigation/footer.tsx +++ b/src/widgets/navigation/footer.tsx @@ -5,12 +5,14 @@ import { FooterProps, FooterItemActiveKey } from '@/entities/common/model/types'; +import { useEffect, useState } from 'react'; export const FooterNavigation = ({ setMenuOn, footerCurrentPage }: FooterProps) => { const { navigate } = useNavigate(); + const [isFooterOn, setIsFooterOn] = useState(false); const onClickToNavigate = (path?: string) => { if(!!path){ @@ -91,11 +93,30 @@ export const FooterNavigation = ({ return rs; }; + useEffect(() => { + + const handleScroll = () => { + if(window.scrollY > window.outerHeight / 3){ + setIsFooterOn(true); + } + else{ + setIsFooterOn(false); + } + }; + + window.addEventListener('scroll', handleScroll); + return () => { + window.removeEventListener('scroll', handleScroll); + }; + }, []); + return ( <> - + { isFooterOn && + + } ); };