File size: 504 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import React from "react";
import Carousel from "../../../components/carousel/Carousel";
import useFetch from "../../../hooks/useFetch";
const Recommendation = ({ mediaType, id }) => {
const { data, loading, error } = useFetch(
`/${mediaType}/${id}/recommendations`
);
return (
<Carousel
title="Recommendations"
data={data?.results}
loading={loading}
endpoint={mediaType}
/>
);
};
export default Recommendation;
|