feat: static generation
This commit is contained in:
1 parent
25866b9eb9
commit
e5c44fe359
7 files changed
+10
-10
No files matched your search
@@ -12,10 +12,10 @@ export const metadata: Metadata = {
|
||||
description: `Discover the top-rated movies on ${TITLE}. Find the highest-rated films and make informed viewing choices.`
|
||||
};
|
||||
|
||||
const Top = () => {
|
||||
const Top = async () => {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc' }));
|
||||
await queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc' }));
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
import popularQuery from '@/data/queries/popular';
|
||||
import useInfiniteList from '@/hooks/useInfiniteList';
|
||||
|
||||
const useTop = () => useInfiniteList(popularQuery({ sortBy: 'vote_average.desc' }));
|
||||
const useTop = () => useInfiniteList({ ...popularQuery({ sortBy: 'vote_average.desc' }), mode: 'default' });
|
||||
|
||||
export default useTop;
|
||||
Reference in new issue
Block a user