index.js 1.84 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';
박상호's avatar
0106    
박상호 committed
16
import Mypage from './Pages/Mypage'
Kim, Subin's avatar
Kim, Subin committed
17
18
19
20
21
22
23
24

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
25
        <Route path="/list" component={ProductsList} />
Kim, Subin's avatar
Kim, Subin committed
26
        <Route path="/product"component={Product} />
kusang96's avatar
kusang96 committed
27
        <Route path="/productslist"component={ProductsList} />
Kim, Subin's avatar
Kim, Subin committed
28
        <Route path="/admin" component={Admin} />
29
        <Route path="/regist" component={ProductsRegist} />
Kim, Subin's avatar
Kim, Subin committed
30
        <Route path="/shoppingcart" component={ShoppingCart} />
31
        <Route path="/payment" component={Payment} />
Jiwon Yoon's avatar
Jiwon Yoon committed
32
33
        <Route path="/account" component={Account}/>
        <Route path='/kakao' component={() => {window.location.href='https://compmath.korea.ac.kr'; return null;}}/>
박상호's avatar
0106    
박상호 committed
34
        <Route path='/mypage' component={Mypage} />
Kim, Subin's avatar
Kim, Subin committed
35
36
37
38
39
40
41
42
43
44
        <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
45
reportWebVitals();