refactoring: first render improvements
This commit is contained in:
1 parent
38aebcbe28
commit
0cface89bf
13 files changed
+38
-33
No files matched your search
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user