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,23 @@
|
||||
import movieAdvisor from '../clients/movieAdvisor';
|
||||
import mapMoviesSeriesResponseToShows from '../dto/Show';
|
||||
|
||||
export type SimilarQueryProps = {
|
||||
showId: string;
|
||||
showType: Show['type'];
|
||||
};
|
||||
|
||||
const similarQuery = ({ showId, showType }: SimilarQueryProps) => ({
|
||||
enabled: Boolean(showId),
|
||||
queryKey: ['similar', showId, showType],
|
||||
initialPageParam: '1',
|
||||
queryFn: ({ pageParam = '1' }: { pageParam?: string }) =>
|
||||
movieAdvisor
|
||||
.get<TMDBPagination<Movie> | TMDBPagination<Series>>(`/${showType}/${showId}/recommendations`, {
|
||||
params: {
|
||||
page: pageParam
|
||||
}
|
||||
})
|
||||
.then((response) => mapMoviesSeriesResponseToShows(response, showType))
|
||||
});
|
||||
|
||||
export default similarQuery;
|
||||
Reference in new issue
Block a user