MovieListPage.js 1.91 KB
Newer Older
1
2
import { useState } from 'react'
import MovieChart from '../components/MovieChart.js'
Jiwon Yoon's avatar
Jiwon Yoon committed
3
import MovieComing from '../components/MovieComing.js'
4

5
const MovieListPage = () => {
Jiwon Yoon's avatar
Jiwon Yoon committed
6
    const [state, setState] = useState(true)
7

8
    return (
Jiwon Yoon's avatar
Jiwon Yoon committed
9
        <div className="container">
10
            <div>
Jiwon Yoon's avatar
Jiwon Yoon committed
11
12
13
14
15
16
17
18
19
                <ul className="nav nav-tabs justify-content-center my-4 border-0" id="myTab" role="tablist">
                    <li className="nav-item" role="presentation">
                        <button className="nav-link active mx-auto" style={{color:"white", borderColor: "black", backgroundColor:"black", borderBottom: state? "3px solid":"none" ,borderBottomColor:state?"#FEDC00":"black"}} id="moviechart-tab" data-bs-toggle="tab" data-bs-target="#moviechart" type="button" role="tab" aria-controls="moviechart" aria-selected="true" onClick={() => setState(true)}>무비차트</button>
                    </li>
                    <li className="nav-item" role="presentation">
                        <button className="nav-link mx-auto" style={{color:"white", borderColor: "black",backgroundColor:"black", borderBottom: state?"none" :"3px solid", borderBottomColor:state?"black": "#FEDC00"}} id="moviecomming-tab" data-bs-toggle="tab" data-bs-target="#moviecomming" type="button" role="tab" aria-controls="moviecomming" aria-selected="false" onClick={() => setState(false)}>상영예정작</button>
                    </li>
                </ul>
            </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
20
21
22
23
24
            <div className="tab-content" id="myTabContent">
                <div className="tab-pane fade show active" id="moviechart" role="tabpanel" aria-labelledby="moviechart-tab">
                    <MovieChart />
                </div>
                <div className="tab-pane fade" id="moviecomming" role="tabpanel" aria-labelledby="moviecomming-tab">
Jiwon Yoon's avatar
Jiwon Yoon committed
25
                    <MovieComing />
Jiwon Yoon's avatar
Jiwon Yoon committed
26
27
                </div>
            </div>
28
29
30
31
32
        </div>
    )
}

export default MovieListPage