Skip to content

Commit

Permalink
Clean up query page params
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoble committed Oct 17, 2024
1 parent 9c1d0a4 commit fcfbbf6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/organisms/cardSlider/section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ export default function Section<T extends GraphqlInfiniteQuery, N>({
infiniteQuery(
{ language, after: null },
{
initialPageParam: { language, after: null },
initialPageParam: null,
getNextPageParam: (last: Maybe<GraphqlInfiniteQuery>) => {
if (!last) return;
const pageInfo = selectPageInfo(last);
if (!pageInfo?.hasNextPage) return;
return {
language,
after: pageInfo.endCursor,
};
},
Expand Down
2 changes: 1 addition & 1 deletion src/containers/sponsor/list/all.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function AllSponsors(props: Props) {
getNextPageParam: (lastPage: Maybe<GetSponsorListAllPageDataQuery>) => {
const pageInfo = lastPage?.sponsors.pageInfo;
if (!pageInfo?.hasNextPage) return;
return { language, after: pageInfo.endCursor };
return { after: pageInfo.endCursor };
},
initialPageParam: null,
},
Expand Down

0 comments on commit fcfbbf6

Please sign in to comment.