import { useState, useEffect } from 'react' import movieApi from '../../apis/movie.api.js' import { Link } from 'react-router-dom'; import styles from "./movieComming.module.scss" const MovieComming = () => { const [TMDB_TopRated_Data, setTMDB_TopRated_Data] = useState() const category="upcoming" useEffect(() => { getTMDB_TopRated() }, []) async function getTMDB_TopRated() { try { const data = await movieApi.getfromTM(category) console.log(data) setTMDB_TopRated_Data(data) } catch (error) { } } return (
{console.log(TMDB_TopRated_Data)} {TMDB_TopRated_Data ? TMDB_TopRated_Data.map(movie => (
Movie Poster
{movie.overview}
{movie.title}

예매율: {movie.ticket_sales}0% | {movie.runtime}분

{movie.release_date} 개봉

)) :
영화정보를 로딩할 수 없습니다.
}
) } export default MovieComming