index.js 1.24 KB
Newer Older
Kim, Chaerin's avatar
어헛    
Kim, Chaerin committed
1
2
3
import React from 'react';
import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
CHAERIN KIM's avatar
CHAERIN KIM committed
4
5
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import 'bootstrap/dist/css/bootstrap.css';
6
7
import axios from 'axios';
// import { PrivateRoute } from './PrivateRoute';
CHAERIN KIM's avatar
CHAERIN KIM committed
8

Ha YeaJin's avatar
login    
Ha YeaJin committed
9

Ha YeaJin's avatar
pages    
Ha YeaJin committed
10
11
12
13
14
15
import Login from './Pages/LoginPage';
import Home from './Pages/HomePage';
import Signup from './Pages/SignupPage';
import Apply from './Pages/ApplyPage';
import Check from './Pages/CheckPage';
import Notice from './Pages/NoticePage';
Ha YeaJin's avatar
Ha YeaJin committed
16

17
18
19
axios.defaults.validateStatus = function (status) {
  return status < 500; // default
}
Kim, Chaerin's avatar
어헛    
Kim, Chaerin committed
20
21

ReactDOM.render(
CHAERIN KIM's avatar
CHAERIN KIM committed
22
23
24
<Router>
    <Switch>
      <Route exact path="/" component={Login} />
Ha YeaJin's avatar
as    
Ha YeaJin committed
25
      <Route path="/home" component={Home} />
Ha YeaJin's avatar
pages    
Ha YeaJin committed
26
27
28
29
      <Route path="/signup" component={Signup} />
      <Route path="/apply" component={Apply} />
      <Route path="/check" component={Check} />
      <Route path="/notice" component={Notice} />
CHAERIN KIM's avatar
CHAERIN KIM committed
30
31
    </Switch>
  </Router>,
Kim, Chaerin's avatar
어헛    
Kim, Chaerin committed
32
33
34
35
36
37
38
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();