mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-29 18:54:34 +08:00
Add learn button to navbar
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
static displayName = 'NotFound'
|
||||
static propTypes = {}
|
||||
componentDidMount() {
|
||||
}
|
||||
render() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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>;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user