diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 5ef932f0..fd2b5471 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -38,10 +38,17 @@ const Home = () => { }; const shortFormData = data.shortForms; + const handleReachEnd = () => { + if (pageData.hasNext) { + setCurrentPage(currentPage + 1); + console.log('마지막'); + } + }; const homeProps: HomeProps = { pageProps: pageData, shortFormProps: shortFormData, + handleReachEnd, }; setShortForm(homeProps); diff --git a/src/pages/home/HomePage.tsx b/src/pages/home/HomePage.tsx index e4c1c595..dc10fae5 100644 --- a/src/pages/home/HomePage.tsx +++ b/src/pages/home/HomePage.tsx @@ -1,12 +1,12 @@ import GNB from 'layouts/GNB'; import Home from './Home'; -import HomeSwiper from './HomeSwiper'; const HomePage = () => { return (