Skip to content

Commit 5b06f4e

Browse files
committed
fix not found page serverRender
1 parent 7e2d445 commit 5b06f4e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/app/components/pages/NotFound.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React from 'react';
22
import { connect } from 'react-redux';
3-
import SvgImage from 'app/components/elements/SvgImage';
43
import { Link } from 'react-router';
54
import Icon from 'app/components/elements/Icon';
65
import * as appActions from 'app/redux/AppReducer';
76

87
class NotFound extends React.Component {
98
componentWillMount() {
10-
this.props.setRouteTag();
9+
this.props.setRouteTag && this.props.setRouteTag();
1110
}
1211
render() {
1312
return (
@@ -67,14 +66,13 @@ class NotFound extends React.Component {
6766
module.exports = {
6867
path: '*',
6968
component: connect(
70-
(state, ownProps) => {
71-
return {};
72-
},
69+
(state, ownProps) => ({}),
7370
dispatch => {
7471
return {
7572
setRouteTag: () =>
7673
dispatch(appActions.setRouteTag({ routeTag: 'not_found' })),
7774
};
7875
}
7976
)(NotFound),
77+
serverRenderComponent: NotFound,
8078
};

src/shared/UniversalRender.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { all } from 'redux-saga/effects';
2727
import { syncHistoryWithStore } from 'react-router-redux';
2828
import rootReducer from 'app/redux/RootReducer';
2929
import rootSaga from 'shared/RootSaga';
30-
import { component as NotFound } from 'app/components/pages/NotFound';
30+
import { serverRenderComponent as NotFound } from 'app/components/pages/NotFound';
3131
import extractMeta from 'app/utils/ExtractMeta';
3232
import Translator from 'app/Translator';
3333
import { routeRegex } from 'app/ResolveRoute';

0 commit comments

Comments
 (0)