App.js 1.26 KB
Newer Older
1
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
Jiwon Yoon's avatar
Jiwon Yoon committed
2
3
4
import Header from "./components/Header";
import SubNav from "./components/Navs/SubNav";
import MainNav from "./components/Navs/MainNav";
5
6
7
8
9
10
11
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
12
import AdminPage from "./pages/AdminPage/AdminPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
13
import TicketingPage from "./pages/TicketingPage";
Jiwon Yoon's avatar
Jiwon Yoon committed
14
15

function App() {
Jiwon Yoon's avatar
Jiwon Yoon committed
16
  
Jiwon Yoon's avatar
Jiwon Yoon committed
17
  return (
Jiwon Yoon's avatar
Jiwon Yoon committed
18
19
20
21
    <div className="" style={{ backgroundColor: "black" }}>
      <SubNav />
      <Header />
      <MainNav />
한규민's avatar
한규민 committed
22
23
24
25
26
      <Router>
        <Switch>
          <Route exact path="/" component={HomePage} />
          <Route path="/login" component={LoginPage} />
          <Route path="/signup" component={SignupPage} />
Jiwon Yoon's avatar
Jiwon Yoon committed
27
28
          <Route path="/movielist" component={MovieListPage} />
          <Route path="/movie/:movieId" component={MoviePage}/>
Jiwon Yoon's avatar
Jiwon Yoon committed
29
          <Route path="/ticket" component={TicketingPage}/>
Jiwon Yoon's avatar
Jiwon Yoon committed
30
          <Route path="/admin" component={AdminPage}/>
한규민's avatar
한규민 committed
31
32
        </Switch>
      </Router>
Jiwon Yoon's avatar
Jiwon Yoon committed
33
    </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
34
35
36
37
  );
}

export default App;