fix: SITE_URL
This commit is contained in:
1 parent
1fe912f4bd
commit
dfdfb79169
66 files changed
+1352
-240
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import movieAdvisor from '../clients/movieAdvisor';
|
||||
import { mapMovieSeriesToShow } from '../dto/Show';
|
||||
|
||||
export type DetailsQueryProps = {
|
||||
showId?: Show['id'];
|
||||
showType?: Show['type'];
|
||||
};
|
||||
|
||||
const detailsQuery = ({ showId, showType }: DetailsQueryProps) => ({
|
||||
enabled: Boolean(showId),
|
||||
queryKey: ['details', showId, showType],
|
||||
queryFn: () =>
|
||||
movieAdvisor
|
||||
.get<(Movie | Series) & Details>(`/${showType}/${showId}`)
|
||||
.then((response) => ({ ...response, ...mapMovieSeriesToShow(response, showType) }))
|
||||
});
|
||||
|
||||
export default detailsQuery;
|
||||
Reference in new issue
Block a user