feat: series
This commit is contained in:
1 parent
b2eef6c494
commit
1e31520c92
25 files changed
+435
-223
No files matched your search
@@ -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)
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user