forked from rock-solid/pwa-theme-woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (32 loc) · 1.08 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { HashRouter, Route, Switch } from 'react-router-dom';
import store from './configureStore';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import Home from './views/Home';
import Products from './views/Products';
import Categories from './views/Categories';
import Product from './views/Product';
import Cart from './views/Cart';
import Search from './views/Search';
import './index.css';
render(
<Provider store={store}>
<HashRouter>
<App>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/categories" component={Categories} />
<Route path="/category/:categId" component={Products} />
<Route path="/product/:productId" component={Product} />
<Route path="/search/:search" component={Search} />
<Route path="/cart" component={Cart} />
</Switch>
</App>
</HashRouter>
</Provider>,
document.getElementById('root'),
);
registerServiceWorker();