import React, { useState } from "react"; import Carousel from "../../../components/carousel/Carousel"; import ContentWrapper from "../../../components/contentWrapper/ContentWrapper"; import SwitchTabs from "../../../components/switchTabs/SwitchTabs"; import useFetch from "../../../hooks/useFetch"; const Trending = () => { const [endpoint, setEndpoint] = useState("day"); const { data, loading } = useFetch(`/trending/movie/${endpoint}`); const onTabChange = (tab) => { setEndpoint(tab === "Day" ? "day" : "week"); }; return (