fix: SITE_URL

This commit is contained in:
ner committed 2024-10-28 17:20:05 +02:00
1 parent 1fe912f4bd
commit dfdfb79169
66 files changed
+1352 -240

No files matched your search

+18
View File
@@ -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;