MovieListPage.js 1011 Bytes
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 = () => {
Kim, Subin's avatar
Kim, Subin committed
6
    const [state, setState] = useState(0)
7

8
    return (
Jiwon Yoon's avatar
Jiwon Yoon committed
9
        <div className="container">
Kim, Subin's avatar
Kim, Subin committed
10
11
12
            <div className="text-center my-5">
                <button className="mx-auto" style={{ color: "white", borderColor: "black", backgroundColor: "black", borderBottom: !state ? "3px solid" : "none", borderBottomColor: !state ? "#FEDC00" : "black" }} type="button" onClick={() => setState(0)}>무비차트</button>
                <button className="mx-auto" style={{ color: "white", borderColor: "black", backgroundColor: "black", borderBottom: !state ? "none" : "3px solid", borderBottomColor: !state ? "black" : "#FEDC00" }} type="button" onClick={() => setState(1)}>상영예정작</button>
Jiwon Yoon's avatar
Jiwon Yoon committed
13
            </div>
Kim, Subin's avatar
Kim, Subin committed
14
            <div>{state === 0 ? <MovieChart /> : <MovieComing />}</div>
15
16
17
18
19
        </div>
    )
}

export default MovieListPage