fix: cache
This commit is contained in:
1 parent
7f77f960d9
commit
095f7361fa
8 files changed
+95
-54
No files matched your search
@@ -5,20 +5,18 @@ import getQueryClient from '@/lib/queryClient';
|
||||
|
||||
import Container from './container';
|
||||
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
queryClient.prefetchInfiniteQuery({
|
||||
queryKey: ['popular'],
|
||||
queryFn: () => popularMovies(),
|
||||
initialPageParam: '1'
|
||||
});
|
||||
|
||||
export default async function Popular() {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
await queryClient.prefetchInfiniteQuery({
|
||||
queryKey: ['popular'],
|
||||
queryFn: () => popularMovies({}),
|
||||
initialPageParam: '1'
|
||||
});
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
<Container />
|
||||
</HydrationBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
export const revalidate = 3600;
|
||||
Reference in new issue
Block a user