App.js 1.52 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";
Kim, Subin's avatar
Kim, Subin committed
13
import AdminPage from "./pages/AdminPage/AdminPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
14
import TicketingPage from "./pages/TicketingPage";
Kim, Subin's avatar
수빈    
Kim, Subin committed
15
import SearchPage from "./pages/SearchPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
16

한규민's avatar
다시    
한규민 committed
17
function App() {
한규민's avatar
push    
한규민 committed
18

Jiwon Yoon's avatar
Jiwon Yoon committed
19
  return (
Jiwon Yoon's avatar
Jiwon Yoon committed
20
    <div className="" style={{ backgroundColor: "black" }}>
한규민's avatar
push    
한규민 committed
21
      <AuthProvider>
한규민's avatar
다시    
한규민 committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
        <Router style={{ backgroundColor: "black" }}>
          <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="/ticket" component={TicketingPage} />
            <Route path="/search" component={SearchPage} />
            <Route path="/admin" component={AdminPage} />
          </Switch>
        </Router>
한규민's avatar
push    
한규민 committed
37
      </AuthProvider>
한규민's avatar
다시    
한규민 committed
38
    </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
39
40
41
42
  );
}

export default App;