import React,{useState, useEffect} from 'react' import axios from 'axios' import { baseUrl } from '../../utils/baseUrl.js' import { Link } from 'react-router-dom'; import styles from "./movieComming.module.scss" const MovieComming = () => { const [TMDB_UpComming_Data, setTMDB_UpComming_Data] = useState() useEffect(() => { getTMDB_UpComming() }, []) async function getTMDB_UpComming() { try { const response = await axios.get(`${baseUrl}/api/movie/upcomming`) console.log(response.data) setTMDB_UpComming_Data([...response.data]) } catch (error) { } } return (
{TMDB_UpComming_Data ? TMDB_UpComming_Data.map(movie => (
Movie Poster
{movie.overview}
{movie.title}

{movie.runtime}분

{movie.release_date} 개봉

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