BoxOffice.js 1.85 KB
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
import { useState, useEffect } from "react"
Kim, Subin's avatar
Kim, Subin committed
2

3
const BoxOffice = ({TMDB_TopRated_Data}) => {
Jiwon Yoon's avatar
Jiwon Yoon committed
4

Kim, Subin's avatar
Kim, Subin committed
5
    return (
Jiwon Yoon's avatar
Jiwon Yoon committed
6
        <div className="container text-center my-3">
Jiwon Yoon's avatar
Jiwon Yoon committed
7
8
9
10
11
12
13
14
            {/* <div id="carouselExampleControls" className="carousel slide" data-bs-ride="carousel">
                <div className="carousel-inner">
                    {TMDB_TopRated_Data.length>0
                        ?
                        TMDB_TopRated_Data.map((movie, index) => {
                            <div  className={`carousel-item ${index === 0 ? "active" : ""}`}>
                                {console.log(movie.poster_path)}
                                <img src={`https://image.tmdb.org/t/p/original${movie.poster_path}`} className="d-block w-100" alt="Movie Poster"/>
Jiwon Yoon's avatar
Jiwon Yoon committed
15
                            </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
16
17
18
19
20
                        })
                        :
                        <div className="carousel-item">
                            {console.log("스틸컷 불러오기 오류")}
                            <img src="/images/none.jpg" className="d-block w-100" alt="등록된 스틸컷이 없습니다." />
Jiwon Yoon's avatar
Jiwon Yoon committed
21
                        </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
22
                    }
Kim, Subin's avatar
Kim, Subin committed
23
                </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
24
25
26
27
28
29
30
31
32
33
                <button className="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
                    <span className="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span className="visually-hidden">Previous</span>
                </button>
                <button className="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
                    <span className="carousel-control-next-icon" aria-hidden="true"></span>
                    <span className="visually-hidden">Next</span>
                </button>
            </div> */}

Jiwon Yoon's avatar
Jiwon Yoon committed
34
        </div>
Kim, Subin's avatar
Kim, Subin committed
35
36
37
    )
}

38
export default BoxOffice