From c97d7f6ff0c7505ecbe9bc0300b73475a0774c55 Mon Sep 17 00:00:00 2001 From: yamdang Date: Thu, 25 Jul 2024 20:06:26 +0900 Subject: [PATCH] =?UTF-8?q?bugfix:=20api=EB=A5=BC=20=EB=AA=BB=20=EB=B0=9B?= =?UTF-8?q?=EC=95=84=EC=98=AC=20=EB=95=8C=20=EB=8D=94=EB=B3=B4=EA=B8=B0=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=82=AC=EB=9D=BC=EC=A7=80=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ListPage/components/MonthChart.jsx | 56 +++++++------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/src/pages/ListPage/components/MonthChart.jsx b/src/pages/ListPage/components/MonthChart.jsx index 9e98623..4747052 100644 --- a/src/pages/ListPage/components/MonthChart.jsx +++ b/src/pages/ListPage/components/MonthChart.jsx @@ -23,7 +23,6 @@ export default function MonthChart({ openModal }) { const [chartIdolData, setChartIdolData] = useState([]); const [nextCursorValue, setNextCursorValue] = useState(0); const [moreButtonDisabled, setMoreButtonDisabled] = useState(false); - const [allButtonDisabled, setAllButtonDisabled] = useState(false); const [isLoading, setIsLoading] = useState(true); const [dataReload, setDataReload] = useState(true); @@ -74,10 +73,8 @@ export default function MonthChart({ openModal }) { setChartIdolData(idols); setNextCursorValue(nextCursor); setIsLoading(false); - setAllButtonDisabled(true); } catch (error) { console.error(error); - setAllButtonDisabled(false); } finally { setIsLoading(false); } @@ -99,15 +96,6 @@ export default function MonthChart({ openModal }) { } }, [nextCursorValue]); - // 페이지 처음 로드할 때 불러온 차트내용이 전부이면 더보기 버튼 안보이게 하기 - useEffect(() => { - if (nextCursorValue === null) { - setAllButtonDisabled(false); - } else { - setAllButtonDisabled(true); - } - }, []); - if (isLoading) { return ( handleClickDataReload()} /> - {allButtonDisabled ? ( - - - - - ) : ( - '' - )} + + + + ); }