refactoring: first render improvements

This commit is contained in:
ner committed 2024-10-21 18:57:49 +03:00
1 parent 38aebcbe28
commit 0cface89bf
13 files changed
+38 -33

No files matched your search

+2 -2
View File
@@ -5,12 +5,12 @@ import getQueryClient from '@/lib/queryClient';
import Container from './container';
const Similar = async ({ searchParams }: { searchParams: Record<string, string> }) => {
const Similar = ({ searchParams }: { searchParams: Record<string, string> }) => {
const queryClient = getQueryClient();
const { id, type } = searchParams || {};
await queryClient.prefetchInfiniteQuery({
queryClient.prefetchInfiniteQuery({
queryKey: ['similar', id, type],
queryFn: () => similarShows({ showId: id, showType: type as Show['type'] }),
initialPageParam: '1'