File tree 3 files changed +4
-2
lines changed
components/pages/main/Feed/BoardsList
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default function BoardsList({
19
19
Observer,
20
20
data : boardList ,
21
21
isLoading,
22
+ hasNextPage,
22
23
} = useGetBoardList ( {
23
24
infiniteQueryKey : [ 'boards' ] ,
24
25
} ) ;
@@ -42,7 +43,6 @@ export default function BoardsList({
42
43
< FeedBoardCard
43
44
userId = { board . writer }
44
45
content = { board . content }
45
- // TODO: 이미지 연결
46
46
imgs = { board . fileNames }
47
47
setShowModal = { setShowModal }
48
48
comments = { board . replyListDto }
@@ -55,6 +55,7 @@ export default function BoardsList({
55
55
) ,
56
56
)
57
57
) }
58
+ { hasNextPage ? null : < div > 🐾 더이상 게시물이 없어요 🐾</ div > }
58
59
< Observer >
59
60
< div > 로딩스피너...</ div >
60
61
</ Observer >
Original file line number Diff line number Diff line change @@ -51,5 +51,6 @@ export default function useGetBoardList({
51
51
Observer,
52
52
data,
53
53
isLoading,
54
+ hasNextPage,
54
55
} ;
55
56
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default async function getBoardList({
29
29
pageSize,
30
30
} : TempPostListApiProps ) {
31
31
try {
32
- const url = `/endpoint/api/board/list?_page =${ pageParam } &_limit =${ pageSize } ` ;
32
+ const url = `/endpoint/api/board/list?pageNumber =${ pageParam } &pageSize =${ pageSize } ` ;
33
33
const response = await fetch ( url ) ;
34
34
if ( ! response . ok ) {
35
35
throw new Error ( `서버오류:${ response . status } ` ) ;
You can’t perform that action at this time.
0 commit comments