import { useState, useEffect } from 'react' import movieApi from "../apis/movie.api.js" // import MovieCard from "./MovieCard/index.js" import { Link } from 'react-router-dom' import styles from './MovieCard/MovieCard.js' import catchErrors from '../utils/catchErrors.js' const MovieComing = () => { const [TMDB_UpComing_Data, setTMDB_UpComing_Data] = useState([]) const [error, setError] = useState("") const category = "upcoming" useEffect(() => { getTMDB_UpComing() }, []) async function getTMDB_UpComing() { try { setError("") const response = await movieApi.getMoviesfromTM(category) setTMDB_UpComing_Data([...response]) } catch (error) { catchErrors(error, setError) } } return ( <> {TMDB_UpComing_Data.length !== 0 ?
예매율: {movie.ticket_sales}0% | {movie.runtime}분
{movie.release_date} 개봉