refactor: clean code and remove unnecessary dependencies

This commit is contained in:
ner committed 2024-09-30 18:54:13 +03:00
1 parent eceae6fec7
commit ebf599eed6
92 files changed
+1152 -2842

No files matched your search

+5 -5
View File
@@ -1,7 +1,7 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { Metadata } from 'next';
import { topMovies } from '@/lib/api';
import { topMovies } from '@/api';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
@@ -12,9 +12,7 @@ export const metadata: Metadata = {
'Discover the top-rated movies on Movie Advisor. Find the highest-rated films and make informed viewing choices.'
};
export const revalidate = 3600;
export default async function Top() {
const Top = async () => {
const queryClient = getQueryClient();
await queryClient.prefetchInfiniteQuery({
@@ -28,4 +26,6 @@ export default async function Top() {
<Container />
</HydrationBoundary>
);
}
};
export default Top;