index.js 1.2 KB
Newer Older
Kim, Chaerin's avatar
Kim, Chaerin committed
1
2
3
4
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
5
6
import App from './App'
import Search from './Search';
Kim, Chaerin's avatar
Kim, Chaerin committed
7
import reportWebVitals from './reportWebVitals';
Lee SeoYeon's avatar
0111    
Lee SeoYeon committed
8
9
import Signup from './Components/Signup'
import Login from './Components/Login'
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
10
import PrivateRoute from "./Components/PrivateRoute";
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
11
import axios from 'axios'
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
12
import Bookmark from "./Bookmark"
Kim, Chaerin's avatar
Kim, Chaerin committed
13
14
15
16
17
18
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Redirect,
} from "react-router-dom";
baesangjune's avatar
.    
baesangjune committed
19

Kim, Chaerin's avatar
Kim, Chaerin committed
20
21
22
23
24
25
ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Switch>
        <Route exact path="/" component={App} />
        <Route path="/search" component={Search} />
Lee SeoYeon's avatar
0111    
Lee SeoYeon committed
26
27
        <Route path='/signup' component={Signup}/>
        <Route path='/login' component={Login} />
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
28
        <PrivateRoute path='/bookmark'><Bookmark/></PrivateRoute>
Kim, Chaerin's avatar
Kim, Chaerin committed
29
        <Redirect path="/search" to="/search" />
Kim, Chaerin's avatar
Kim, Chaerin committed
30
31
32
33
34
35
36
37
38
39
      </Switch>
    </Router>
  </React.StrictMode>,
  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();