App.js 2.27 KB
Newer Older
1
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
한규민's avatar
push    
한규민 committed
2
import { AuthProvider } from "./context/auth_context";
Jiwon Yoon's avatar
Jiwon Yoon committed
3
4
5
import Header from "./components/Header";
import SubNav from "./components/Navs/SubNav";
import MainNav from "./components/Navs/MainNav";
6
7
8
9
10
11
12
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";
한규민's avatar
한규민 committed
13
import GuestPage from "./pages/GuestPage";
Kim, Subin's avatar
Kim, Subin committed
14
import AdminPage from "./pages/AdminPage/AdminPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
15
import TicketingPage from "./pages/TicketingPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
16
import TicketingSeatPage from './pages/TicketingSeatPage'
Kim, Subin's avatar
수빈    
Kim, Subin committed
17
import SearchPage from "./pages/SearchPage";
18
import PaymentPage from "./pages/PaymentPage/PaymentPage";
19
import PaymentCompletePage from "./pages/PaymentCompletePage";
20
import PaymentFailPage from "./pages/PaymentFailPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
21

한규민's avatar
다시    
한규민 committed
22
function App() {
한규민's avatar
push    
한규민 committed
23

Jiwon Yoon's avatar
Jiwon Yoon committed
24
  return (
Kim, Subin's avatar
Kim, Subin committed
25
26
27
28
29
    <AuthProvider>
      <Router>
        <Switch>
          <Route path="/admin" component={AdminPage} />
          <div style={{ backgroundColor: "black" }}>
Kim, Subin's avatar
Kim, Subin committed
30
31
32
33
34
35
36
37
38
39
            <SubNav />
            <Header />
            <MainNav />
            <Switch>
              <Route exact path="/" component={HomePage} />
              <Route path="/login" component={LoginPage} />
              <Route path="/signup" component={SignupPage} />
              <Route path="/movielist" component={MovieListPage} />
              <Route path="/movie/:movieId" component={MoviePage} />
              <Route path="/mypage" component={MyPage} />
Jiwon Yoon's avatar
Jiwon Yoon committed
40
              <Route path="/guest" component={GuestPage}/>
Kim, Subin's avatar
여백    
Kim, Subin committed
41
              <Route path="/ticket/seat" component={TicketingSeatPage} />
Kim, Subin's avatar
Kim, Subin committed
42
              <Route path="/ticket" component={TicketingPage} />
43
              <Route path="/payment" component={PaymentPage} />
Jiwon Yoon's avatar
Jiwon Yoon committed
44
              <Route path="/paymentcomplete" component={PaymentCompletePage} />
45
              <Route path="/paymentfail" component={PaymentFailPage} />
Jiwon Yoon's avatar
Jiwon Yoon committed
46
              <Route path="/theater" component={TheaterPage}/>
Kim, Subin's avatar
Kim, Subin committed
47
48
              <Route path="/search" component={SearchPage} />
            </Switch>
Kim, Subin's avatar
Kim, Subin committed
49
          </div>
Kim, Subin's avatar
여백    
Kim, Subin committed
50

Kim, Subin's avatar
Kim, Subin committed
51
52
53
        </Switch>
      </Router>
    </AuthProvider>
Jiwon Yoon's avatar
Jiwon Yoon committed
54
55
56
  );
}

Kim, Subin's avatar
Kim, Subin committed
57
export default App;