import axios from "axios";
import React, { useEffect, useState } from "react";
export default function ({ isLargeLow, title, id, fetchUrl }) {
const [movies, setMovies] = useState([]);
useEffect(() => {
fetchMovieData();
}, []);
// const fetchMovieData = async () => {};
const fetchMovieData = async () => {
const request = await axios.get(fetchUrl);
console.log("request", request);
// setMovies(request.data.results);
};
return <div></div>;
}
import requests from "./api/requests";
import "./App.css";
import Banner from "./components/Banner";
import Nav from "./components/Nav";
import Row from "./components/Row";
function App() {
return (
<div className="App">
<Nav />
<Banner />
<Row
title="NEFLIX ORIGINALS"
id="NO"
fetchUrl={requests.fetchNetflixOriginals}
isLargeRow
/>
<Row title="Trending Now" id="TN" fetchUrl={requests.fetchTrending} />
<Row title="Top Rated" id="TR" fetchUrl={requests.fetchTopRated} />
<Row
title="Action Movies"
id="AM"
fetchUrl={requests.fetchActionMovies}
/>
<Row title="Comedy Movie" id="CM" fetchUrl={requests.fetchComedyMovies} />
</div>
);
}
export default App;
와 감사합니다!! 해결 됐습니다!!