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

23 lines
419 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;
}
export default React.createClass({
displayName: 'NotFound',
propTypes: {
params: PropTypes.object
},
componentWillMount() {
goToServer(this.props.params.splat);
},
componentDidMount() {
},
render() {
return <span></span>;
}
});