import { useState, useEffect } from 'react' import TheaterInfo from '../components/TheaterInfo' import TimeTable from "../components/Admin/TimeTable" import TicketFeeTable from '../components/Admin/TicketFeeTable' import cinemaApi from "../apis/cinema.api.js" import theaterApi from '../apis/theater.api.js' import catchErrors from "../utils/catchErrors.js" const TheaterPage = () => { const [theaterTypeList, setTheaterTypeList] = useState([]) const [ticketFeeInfo, setTicketFeeInfo] = useState("") const [state, setState] = useState(0) const [selectTheater, setSelectTheater] = useState(0) const [error, setError] = useState("") useEffect(() => { getTicketFeeInfo() getTheaterType() }, []) async function getTheaterType() { try { setError("") const res = await theaterApi.getTheaterType() setTheaterTypeList(res) } catch (error) { catchErrors(error, setError) } } async function getTicketFeeInfo() { try { setError("") const res = await cinemaApi.getCinemaInfo() setTicketFeeInfo(res.moreFeeInfo) } catch (error) { catchErrors(error, setError) } } return (
{ticketFeeInfo}
) } export default TheaterPage