import React, { useState, useEffect } from "react"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import Header from "./components/Header"; import SubNav from "./components/Navs/SubNav"; import MainNav from "./components/Navs/MainNav"; import HomePage from "./pages/HomePage"; import LoginPage from "./pages/LoginPage"; import SignupPage from "./pages/SignupPage"; import MovieListPage from "./pages/MovieListPage"; import MoviePage from "./pages/MoviePage"; import TheaterPage from "./pages/TheaterPage"; import MyPage from "./pages/MyPage"; import AdminPage from "./pages/AdminPage/AdminPage"; import TicketingPage from "./pages/TicketingPage"; import TicketingSeatPage from './pages/TicketingSeatPage' import SearchPage from "./pages/SearchPage"; import Payment from "./pages/PaymentPage"; const AppContext = React.createContext(); function App() { const [role, setRole] = useState("user"); const store = {role, setRole}; return (