Skip to content

Commit f994c13

Browse files
committed
ssr
1 parent 691cc29 commit f994c13

File tree

7 files changed

+3465
-10
lines changed

7 files changed

+3465
-10
lines changed

src/app/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'jquery';
1111
import 'font-awesome/css/font-awesome.min.css';
1212
import 'bootstrap/dist/css/bootstrap.min.css';
1313
import 'bootstrap/dist/js/bootstrap.min.js';
14+
import injectGlobalStyle from './style/injectGlobalStyle';
1415
import Root from './Root';
1516
// #endregion
1617

@@ -26,6 +27,7 @@ const BootstrapedElement = document.getElementById(ELEMENT_TO_BOOTSTRAP);
2627
// #endregion
2728

2829
injectTpEventPlugin();
30+
injectGlobalStyle();
2931

3032
const renderApp = RootComponent => {
3133
render(

src/app/redux/store/configureStore.dev.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { createStore, applyMiddleware } from 'redux';
55
import { createLogger } from 'redux-logger';
66
import { routerMiddleware } from 'react-router-redux';
77
// #region import createHistory from hashHistory or BrowserHistory:
8-
import createHistory from 'history/createHashHistory';
9-
// import createHistory from 'history/createBrowserHistory';
8+
// import createHistory from 'history/createHashHistory';
9+
import createHistory from 'history/createBrowserHistory';
1010
// #endregion
1111
import thunkMiddleware from 'redux-thunk';
1212
import reducer from '../modules/reducers';
@@ -27,7 +27,7 @@ const enhancer = composeWithDevTools(
2727
);
2828

2929
// export default = "redux store"
30-
export default function configureStore(initialState) {
30+
export default function configureStore(initialState: any) {
3131
const store = createStore(reducer, initialState, enhancer);
3232
if (module.hot) {
3333
module.hot.accept('../modules/reducers', () =>

src/app/redux/store/configureStore.prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { createStore, applyMiddleware } from 'redux';
55
import thunkMiddleware from 'redux-thunk';
66
import { routerMiddleware } from 'react-router-redux';
77
// #region import createHistory from hashHistory or BrowserHistory:
8-
import createHistory from 'history/createHashHistory';
9-
// import createHistory from 'history/createBrowserHistory';
8+
// import createHistory from 'history/createHashHistory';
9+
import createHistory from 'history/createBrowserHistory';
1010
// #endregion
1111
import reducer from '../modules/reducers';
1212
import { composeWithDevTools } from 'redux-devtools-extension';
@@ -20,6 +20,6 @@ const enhancer = composeWithDevTools(
2020
);
2121

2222
// export default = "redux store"
23-
export default function configureStore(initialState) {
23+
export default function configureStore(initialState: any) {
2424
return createStore(reducer, initialState, enhancer);
2525
}

src/app/style/injectGlobalStyle.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @flow
2+
3+
// #region imports
4+
import { injectGlobal } from 'styled-components';
5+
// #endregion
6+
7+
const injectGlobalStyle = () => injectGlobal`
8+
html, body {
9+
margin: 0;
10+
height: 100%;
11+
-webkit-font-smoothing: antialiased;
12+
}
13+
#main {
14+
height: 100%;
15+
> div {
16+
height: 100%;
17+
}
18+
}
19+
* {
20+
box-sizing: border-box;
21+
}
22+
a {
23+
text-decoration: none;
24+
color: inherit;
25+
&:hover {
26+
text-decoration: none;
27+
}
28+
}
29+
`;
30+
31+
export default injectGlobalStyle;

0 commit comments

Comments
 (0)