feat: series

This commit is contained in:
ner committed 2024-06-19 18:28:17 +03:00
1 parent b2eef6c494
commit 1e31520c92
25 files changed
+435 -223

No files matched your search

+3 -3
View File
@@ -2,10 +2,10 @@ import { useQuery } from '@tanstack/react-query';
import { credits } from '@/lib/api';
const useCredits = ({ movieId }: { movieId?: Movie['id'] }) => {
const useCredits = ({ movieId, type }: { movieId?: Movie['id']; type?: ShowType }) => {
return useQuery({
queryKey: ['credits', movieId],
queryFn: () => credits({ movieId: movieId! }),
queryKey: ['credits', movieId, type],
queryFn: () => credits({ movieId: movieId!, type }),
enabled: Boolean(movieId)
});
};