index.js 1.21 KB
Newer Older
우지원's avatar
우지원 committed
1
2
3
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
우지원's avatar
ul    
우지원 committed
4
5
6
// import App from './App';
import SignUpPage from './Pages/SignUpPage';
import ProfilePage from './Pages/ProfilePage';
우지원's avatar
우지원 committed
7
8
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';
우지원's avatar
ul    
우지원 committed
9
import LogInPage from './Pages/LogInPage';
Choi Ga Young's avatar
Choi Ga Young committed
10
// import LoginForm from './Pages/LoginForm';
우지원's avatar
ul    
우지원 committed
11
12
13
14
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import Hello from './Hello'
import HomePage from './Pages/HomePage'

우지원's avatar
우지원 committed
15
16

ReactDOM.render(
우지원's avatar
ul    
우지원 committed
17
18
  <Router>
    <Switch>
Choi Ga Young's avatar
Choi Ga Young committed
19
20
21
22
      <Route exact path="/" component={HomePage} />
      <Route path="/login" component={LogInPage} />
      <Route path="/signup" component={SignUpPage} />
      <Route path="/profile" component={ProfilePage} />
우지원's avatar
ul    
우지원 committed
23
      <Route path="/hello" component={Hello} />
Choi Ga Young's avatar
Choi Ga Young committed
24
      <Route path="/home" component={HomePage} />
우지원's avatar
ul    
우지원 committed
25
26
27
      <Redirect path='/hello' to='/hello' />
    </Switch>
  </Router>,
우지원's avatar
우지원 committed
28
29
30
31
32
33
34
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();