-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
42 lines (38 loc) · 1.26 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
import { ConnectedRouter } from 'react-router-redux';
import { injectGlobal } from 'styled-components';
import { Provider } from 'react-redux';
import React from 'react';
import ReactDOM from 'react-dom';
import 'normalize.css';
import Routes from './routes';
import createStore from './store';
import history from './utils/history';
import { subscribeProgress } from './utils/progress-storage';
import { subscribeBgmMusic } from './utils/bgm';
import './utils/trigger-audio-effect';
import registerServiceWorker from './registerServiceWorker';
injectGlobal`
html,body {
margin: 0;
padding: 0;
font-family: "HanHei SC","PingHei","PingFang SC","STHeitiSC-Light","Helvetica Neue","Helvetica","Arial",sans-serif;
box-sizing: border-box;
overflow: hidden; /* This approach only works for desktop browsers, and mobile Android. */
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
user-select: none;
}
`;
const store = createStore(history);
subscribeProgress(store);
// subscribeBgmMusic(store);
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<Routes />
</ConnectedRouter>
</Provider>,
document.getElementById('root')
);
registerServiceWorker();