Browse Source

site: fix react-router warning

pull/1289/head
Benjy Cui 9 years ago
parent
commit
b0fc16c3fc
  1. 6
      site/component/Header/index.jsx

6
site/component/Header/index.jsx

@ -43,7 +43,7 @@ export default class Header extends React.Component {
}
handleSearch(value) {
this.props.history.push({ pathname: value });
this.context.router.push({ pathname: value });
}
handleSelectFilter(value, option) {
@ -137,3 +137,7 @@ export default class Header extends React.Component {
);
}
}
Header.contextTypes = {
router: React.PropTypes.object.isRequired,
};

Loading…
Cancel
Save