Files
freeCodeCamp/common/app/components/NotFound/index.jsx
2017-02-05 13:13:36 +00:00

26 lines
509 B
JavaScript

import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { hardGoTo } from '../../redux/actions';
const propTypes = {
hardGoTo: PropTypes.func,
location: PropTypes.object
};
export class NotFound extends React.Component {
componentWillMount() {
this.props.hardGoTo(this.props.location.pathname);
}
render() {
return <span />;
}
}
NotFound.displayName = 'NotFound';
NotFound.propTypes = propTypes;
export default connect(null, { hardGoTo })(NotFound);