index.js 1.76 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';
kusang96's avatar
kusang96 committed
7
8
import Product from "./Pages/Product";
import ProductsList from "./Pages/ProductsList";
Kim, Subin's avatar
Kim, Subin committed
9
import Admin from './Pages/Admin';
10
import ProductsRegist from './Pages/ProductsRegist';
Kim, Subin's avatar
Kim, Subin committed
11
12
13
14
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
15
import Account from './Pages/Account';
Kim, Subin's avatar
Kim, Subin committed
16
17
18
19
20
21
22
23

ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Switch>
        <Route exact path="/" component={Home} />
        <Route path="/login" component={Login} />
        <Route path="/signup" component={Signup} />
박상호's avatar
1    
박상호 committed
24
        <Route path="/list" component={ProductsList} />
Kim, Subin's avatar
Kim, Subin committed
25
        <Route path="/product"component={Product} />
kusang96's avatar
kusang96 committed
26
        <Route path="/productslist"component={ProductsList} />
Kim, Subin's avatar
Kim, Subin committed
27
        <Route path="/admin" component={Admin} />
28
        <Route path="/regist" component={ProductsRegist} />
Kim, Subin's avatar
Kim, Subin committed
29
        <Route path="/shoppingcart" component={ShoppingCart} />
30
        <Route path="/payment" component={Payment} />
Jiwon Yoon's avatar
Jiwon Yoon committed
31
32
        <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
33
34
35
36
37
38
39
40
41
42
        <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
43
reportWebVitals();