From b4360ae9fc2c74baa9e0218b6223ef02924e8da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=90=E1=85=A2=E1=84=92=E1=85=AE?= =?UTF-8?q?=E1=86=AB?= Date: Wed, 23 Oct 2024 14:58:36 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20`useMainPageYScroll.ts`=EB=A5=BC=20Featu?= =?UTF-8?q?reSection=20=EB=82=B4=EB=B6=80=EC=97=90=EC=84=9C=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/MainPage/MainPage.tsx | 6 +++--- .../MainPage/Section/FeatureSection/FeatureSection.tsx | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/client/src/pages/MainPage/MainPage.tsx b/client/src/pages/MainPage/MainPage.tsx index d2e56112..3901da27 100644 --- a/client/src/pages/MainPage/MainPage.tsx +++ b/client/src/pages/MainPage/MainPage.tsx @@ -1,5 +1,4 @@ import useAmplitude from '@hooks/useAmplitude'; -import useMainPageYScroll from '@hooks/useMainPageYScroll'; import Nav from './Nav/Nav'; import {MainSection} from './Section/MainSection'; @@ -7,16 +6,17 @@ import {DescriptionSection} from './Section/DescriptionSection'; import {FeatureSection} from './Section/FeatureSection'; import {mainContainer} from './MainPage.style'; import CreatorSection from './Section/CreatorSection/CreatorSection'; +import useMainPageYScroll from '@hooks/useMainPageYScroll'; const MainPage = () => { const {trackStartCreateEvent} = useAmplitude(); - const {featureSectionRef} = useMainPageYScroll(); + return (
); diff --git a/client/src/pages/MainPage/Section/FeatureSection/FeatureSection.tsx b/client/src/pages/MainPage/Section/FeatureSection/FeatureSection.tsx index 0b35f25c..df2a773f 100644 --- a/client/src/pages/MainPage/Section/FeatureSection/FeatureSection.tsx +++ b/client/src/pages/MainPage/Section/FeatureSection/FeatureSection.tsx @@ -1,16 +1,18 @@ import {css} from '@emotion/react'; -import {forwardRef, ForwardedRef} from 'react'; import {SimpleShare} from './SimpleShare'; import {AutoCalculate} from './AutoCalculate'; import {CheckDeposit} from './CheckDeposit'; import {SimpleTransfer} from './SimpleTransfer'; import {RecordMemoryWithPhoto} from './RecordMemoryWithPhoto'; +import useMainPageYScroll from '@hooks/useMainPageYScroll'; + +const FeatureSection = () => { + const {featureSectionRef} = useMainPageYScroll(); -const FeatureSection = forwardRef((props, ref: ForwardedRef) => { return (
((props, ref: ForwardedRef
); -}); +}; export default FeatureSection;