-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
95 lines (79 loc) · 2.01 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import React, { Fragment } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import configureStore from './store/configureStore';
import createHistory from 'history/createBrowserHistory';
import { Route } from 'react-router';
import { ConnectedRouter } from 'react-router-redux';
import ProductOverview from './components/products/ProductOverview';
import ProductDetail from './components/products/ProductDetail';
import Navigation from './components/navigation/Navigation';
import registerServiceWorker from './registerServiceWorker';
import { injectGlobal } from 'styled-components';
import normalize from 'styled-normalize';
import 'loaders.css/loaders.min.css';
injectGlobal`
${normalize}
body {
font-family: 'Open Sans', sans-serif;
font-size: 1rem;
line-height: 1.5rem;
padding-top: 64px;
}
h1, h2, h3, h4, h5, h6, a {
font-weight: bold;
color: #1a5ca3;
}
h1 {
font-size: 4.25rem;
line-height: 4.5rem;
margin-top: 1.5rem;
margin-bottom: 3rem;
}
h2 {
font-size: 2.625rem;
line-height: 3rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
}
h3 {
font-size: 1.625rem;
line-height: 3rem;
margin-top: 1.5rem;
margin-bottom: 0rem;
}
h4, h5, h6 {
font-size: 1rem;
line-height: 1.5rem;
margin-top: 1.5rem;
margin-bottom: 0rem;
}
.loader-hidden {
display: none;
}
.loader-active {
margin: 0 auto;
display: table;
}
.square-spin > div {
border: none !important;
}
`;
const { store, persistor } = configureStore();
const history = createHistory();
ReactDOM.render(
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<ConnectedRouter history={history}>
<Fragment>
<Navigation />
<Route exact path="/" component={ProductOverview} />
<Route path="/product/:id" component={ProductDetail} />
</Fragment>
</ConnectedRouter>
</PersistGate>
</Provider>,
document.getElementById('root')
);
registerServiceWorker();