Files
freeCodeCamp/common/app/components/NotFound/index.jsx

26 lines
509 B
JavaScript
Raw Normal View History

2015-11-19 22:45:31 -08:00
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { hardGoTo } from '../../redux/actions';
2015-11-19 22:45:31 -08:00
2017-01-12 06:54:43 +00:00
const propTypes = {
hardGoTo: PropTypes.func,
location: PropTypes.object
};
export class NotFound extends React.Component {
2016-01-27 11:34:44 -08:00
2015-11-19 22:45:31 -08:00
componentWillMount() {
this.props.hardGoTo(this.props.location.pathname);
2016-01-27 11:34:44 -08:00
}
2015-11-19 22:45:31 -08:00
render() {
2016-08-03 18:25:31 +01:00
return <span />;
2015-11-19 22:45:31 -08:00
}
2016-01-27 11:34:44 -08:00
}
2017-01-12 06:54:43 +00:00
NotFound.displayName = 'NotFound';
NotFound.propTypes = propTypes;
export default connect(null, { hardGoTo })(NotFound);