diff --git a/src/pages/home/HomePage.tsx b/src/pages/home/HomePage.tsx index f1506e3e..908a7dbb 100644 --- a/src/pages/home/HomePage.tsx +++ b/src/pages/home/HomePage.tsx @@ -41,6 +41,7 @@ const HomePage = () => { }), getNextPageParam: (lastPage) => lastPage.nextCursorId ?? undefined, staleTime: 60 * 1000, + placeholderData: (previousData) => previousData, }); const handleCategoryChange = (selected: string[]) => { @@ -99,6 +100,9 @@ const HomePage = () => { return out; }, [data, isCategoryEmpty]); + const hasArticles = articles.length > 0; + const isInitialLoading = isLoading && !hasArticles; + // 카테고리 미선택 상태: API 호출 없이 안내 문구만 렌더 if (isCategoryEmpty) { return ( @@ -159,11 +163,11 @@ const HomePage = () => { {/* 기사 카드 그리드 */}