File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/app/(with-tracker)/(auth-required)/main Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ export const Content = () => {
2727
2828 const { data : posts , fetchNextPage } = useInfiniteQuery ( {
2929 queryKey : [ PATHS . POSTS , [ searchParams . asc , searchParams . sort ] ] , // Query Key
30- queryFn : async ( { pageParam } ) =>
30+ queryFn : async ( { pageParam = '' } ) =>
3131 await postList (
3232 { } ,
3333 { asc : searchParams . asc === 'true' , sort : searchParams . sort || '' } ,
3434 pageParam ,
3535 ) ,
36- getNextPageParam : ( lastPage ) => Number ( lastPage . nextCursor . split ( ',' ) [ 1 ] ) ,
37- getPreviousPageParam : ( ) => 0 ,
38- initialPageParam : undefined ,
36+ getNextPageParam : ( lastPage ) => lastPage . nextCursor ,
37+ getPreviousPageParam : ( ) => '' ,
38+ initialPageParam : '' ,
3939 } ) ;
4040
4141 const { data : summaries } = useQuery ( {
You can’t perform that action at this time.
0 commit comments