index.js 1.59 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
2
3
4
5
6
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';
7
import Product from "./Pages/Products";
Kim, Subin's avatar
Kim, Subin committed
8
import Admin from './Pages/Admin';
9
import ProductsRegist from './Pages/ProductsRegist';
Kim, Subin's avatar
Kim, Subin committed
10
11
12
13
import ShoppingCart from './Pages/ShoppingCart';
import Payment from './Pages/Payment';
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';
Jiwon Yoon's avatar
Jiwon Yoon committed
14
import Account from './Pages/Account';
Kim, Subin's avatar
Kim, Subin committed
15
16
17
18
19
20
21
22

ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Switch>
        <Route exact path="/" component={Home} />
        <Route path="/login" component={Login} />
        <Route path="/signup" component={Signup} />
23
        <Route path="/product"component={Product} />
Kim, Subin's avatar
Kim, Subin committed
24
        <Route path="/admin" component={Admin} />
25
        <Route path="/regist" component={ProductsRegist} />
Kim, Subin's avatar
Kim, Subin committed
26
        <Route path="/shoppingcart" component={ShoppingCart} />
27
        <Route path="/payment" component={Payment} />
Jiwon Yoon's avatar
Jiwon Yoon committed
28
29
        <Route path="/account" component={Account}/>
        <Route path='/kakao' component={() => {window.location.href='https://compmath.korea.ac.kr'; return null;}}/>
Kim, Subin's avatar
Kim, Subin committed
30
31
32
33
34
35
36
37
38
39
        <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
40
reportWebVitals();