From 0a885e270d630e46569568d19d875d4b5a4bd359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=98=81=EC=9A=B0?= Date: Wed, 20 Dec 2023 21:02:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AB=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=91=90=EB=B2=88=20=ED=98=B8=EC=B6=9C=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/index.tsx b/pages/index.tsx index 417c757..9bd2299 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -51,6 +51,7 @@ function Home() { // TODO : ModalLayer 로 로그인한 사용자의 Context 생성 필요 // eslint-disable-next-line consistent-return const selectRooms = async () => { + console.log('%c 🤩🤩🤩 영우의 로그 그럼 왜: ', 'font-size: x-large; color: #bada55;', ''); try { const data = await getRooms({ ...searchParams, @@ -120,6 +121,9 @@ function Home() { useEffect(() => { const fetchData = async () => { + if (page === 0) { + return; + } const data = await getRooms({ ...searchParams, page }); setRooms((prevRooms) => [...prevRooms, ...(data?.content || [])]); setTotalElements(data?.totalElements || 0); @@ -131,6 +135,7 @@ function Home() { // 최초 접근 시 Room 정보 조회 useEffect(() => { (async () => { + console.log('%c 🤩🤩🤩 영우의 로그 이게 두번?: ', 'font-size: x-large; color: #bada55;', ''); const resultRooms = await selectRooms(); const resultLikedRooms = (await getLikedRooms(page))?.content; const roomIds = [];