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

27 lines
447 B
JavaScript
Raw Normal View History

2015-11-19 22:45:31 -08:00
import React, { PropTypes } from 'react';
const win = typeof window !== 'undefined' ? window : {};
function goToServer(path) {
win.location = '/' + path;
}
2016-01-27 11:34:44 -08:00
export default class extends React.Component {
static displayName = 'NotFound';
static propTypes = {
2015-11-19 22:45:31 -08:00
params: PropTypes.object
2016-01-27 11:34:44 -08:00
};
2015-11-19 22:45:31 -08:00
componentWillMount() {
goToServer(this.props.params.splat);
2016-01-27 11:34:44 -08:00
}
2015-11-19 22:45:31 -08:00
componentDidMount() {
2016-01-27 11:34:44 -08:00
}
2015-11-19 22:45:31 -08:00
render() {
return <span></span>;
}
2016-01-27 11:34:44 -08:00
}