index.js 1.3 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
2
3
4
5
6
7
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import Home from './Pages/Home';
import Login from './Pages/Login';
import Signup from './Pages/Signup';
import Admin from './Pages/Admin';
8
import ProductsRegist from './Pages/ProductsRegist';
Kim, Subin's avatar
Kim, Subin committed
9
10
11
12
13
14
15
16
17
18
19
20
import ShoppingCart from './Pages/ShoppingCart';
import Payment from './Pages/Payment';
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';

ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Switch>
        <Route exact path="/" component={Home} />
        <Route path="/login" component={Login} />
        <Route path="/signup" component={Signup} />
Kim, Subin's avatar
Kim, Subin committed
21
        <Route path="/admin" component={Admin} />
22
        <Route path="/regist" component={ProductsRegist} />
Kim, Subin's avatar
Kim, Subin committed
23
        <Route path="/shoppingcart" component={ShoppingCart} />
24
        <Route path="/payment" component={Payment} />
Kim, Subin's avatar
Kim, Subin committed
25
26
27
28
29
30
31
32
33
34
        <Redirect path="/" to="/" />
      </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
Jiwon Yoon's avatar
Jiwon Yoon committed
35
reportWebVitals();