fix: list fetching

This commit is contained in:
ner committed 2024-03-25 18:20:57 +02:00
1 parent d1361bd455
commit 5f5a7b9d87
2 files changed
+14 -14

No files matched your search

+7 -7
View File
@@ -5,15 +5,15 @@ import getQueryClient from '@/lib/queryClient';
import Container from './container';
const queryClient = getQueryClient();
export default async function Popular() {
const queryClient = getQueryClient();
queryClient.prefetchInfiniteQuery({
queryKey: ['popular'],
queryFn: () => popularMovies(),
initialPageParam: '1'
});
await queryClient.prefetchInfiniteQuery({
queryKey: ['popular'],
queryFn: () => popularMovies(),
initialPageParam: '1'
});
export default function Popular() {
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<Container />