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

function App() {
Kim, Subin's avatar
수빈    
Kim, Subin committed
17

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

export default App;