diff --git a/mocks/handlers.ts b/mocks/handlers.ts index d479bdf..311c944 100644 --- a/mocks/handlers.ts +++ b/mocks/handlers.ts @@ -24,8 +24,10 @@ export const handlers = [ msg: 'success!', data: { main_contents_list: contents, - is_last: false, - start, + paging: { + is_last: false, + start, + }, }, }), ); @@ -48,8 +50,10 @@ export const handlers = [ msg: 'success!', data: { main_writer_list: writers, - is_last: false, - start, + paging: { + is_last: false, + start, + }, }, }), ); diff --git a/pages/index.tsx b/pages/index.tsx index 55c203c..f6739d5 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -70,7 +70,9 @@ const Main: NextPage = function () { useInfinityContents(searchParams, { getNextPageParam: (lastPage) => { const { - data: { isLast, start }, + data: { + paging: { isLast, start }, + }, } = lastPage; return !isLast ? start + DEFAULT_SEARCH_RANGE : false; diff --git a/pages/writers.tsx b/pages/writers.tsx index f75f0a3..c4d8645 100644 --- a/pages/writers.tsx +++ b/pages/writers.tsx @@ -66,7 +66,9 @@ const Main: NextPage = function () { useInfinityWriters(searchParams, { getNextPageParam: (lastPage) => { const { - data: { isLast, start }, + data: { + paging: { isLast, start }, + }, } = lastPage; return !isLast ? start + DEFAULT_SEARCH_RANGE : false;