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 ? ( - - - - - ) : ( - '' - )} + + + + ); }