TicketingTheater.js 648 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
import styles from "./ticketingTheater.module.scss"
const TicketingTheater = (props) => {

Jiwon Yoon's avatar
Jiwon Yoon committed
4
5
6
    function handleClick(event) {
        // event.preventDefault()
        console.log(event.target.name)
7
        props.setTicketInfo({ ...props.ticketInfo, cinema: event.target.name })
Jiwon Yoon's avatar
Jiwon Yoon committed
8
9
    }

Jiwon Yoon's avatar
Jiwon Yoon committed
10
    return (
Jiwon Yoon's avatar
Jiwon Yoon committed
11
        <div >
Jiwon Yoon's avatar
Jiwon Yoon committed
12
            <div className="d-grid gap-2">
13
                <button name={props.cinemaInfo.cinemaName} className={`${props.ticketInfo.cinema === props.cinemaInfo.cinemaName ? styles.on : styles.btn}`} onClick={handleClick}>{props.cinemaInfo.cinemaName}</button>
Jiwon Yoon's avatar
Jiwon Yoon committed
14
15
16
17
18
19
            </div>
        </div>
    )
}

export default TicketingTheater