feat: improve handling of stays
This commit is contained in:
committed by
Michael Zetterberg
parent
e733ce283a
commit
f46207a308
@@ -19,9 +19,13 @@ export default function ClientPreviousStays({
|
||||
}: PreviousStaysClientProps) {
|
||||
const { data, isFetching, fetchNextPage, hasNextPage, isLoading } =
|
||||
trpc.user.stays.previous.useInfiniteQuery(
|
||||
{},
|
||||
{
|
||||
getNextPageParam: (lastPage) => lastPage?.nextCursor,
|
||||
limit: 6,
|
||||
},
|
||||
{
|
||||
getNextPageParam: (lastPage) => {
|
||||
return lastPage?.nextCursor
|
||||
},
|
||||
initialData: {
|
||||
pageParams: [undefined, 1],
|
||||
pages: [initialPreviousStays],
|
||||
|
||||
Reference in New Issue
Block a user