로딩 중...
;
+ if (isLoading && comments.length === 0) return 로딩 중...
;
if (error) return
-
+ {isLoadingMore && (
+
+
+
+ )}
+ {!isLoadingMore && data?.nextCursor !== null && (
+
+
)}
diff --git a/src/hooks/useGetRecentComments.ts b/src/hooks/useGetRecentComments.ts
index 443938a9..40ce3824 100644
--- a/src/hooks/useGetRecentComments.ts
+++ b/src/hooks/useGetRecentComments.ts
@@ -2,10 +2,11 @@ import { useQuery } from '@tanstack/react-query';
import getRecentComments from '@/apis/getRecentComments';
import { GetRecentCommentsResponseType } from '@/schema/recentcomment';
-const useGetRecentComments = (limit: number) =>
+const useGetRecentComments = ({ cursor, limit, enabled }: { cursor: number; limit: number; enabled: boolean }) =>
useQuery