index.js 1.06 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'
Kim, Chaerin's avatar
Kim, Chaerin committed
10
11
12
13
14
15
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Redirect,
} from "react-router-dom";
baesangjune's avatar
.    
baesangjune committed
16
17
import axios from 'axios';

18

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