React router #343
18
react/components/FourOhFourPage/index.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import React from 'react';
|
||||||
|
import NavBar from 'containers/NavBar';
|
||||||
|
|
||||||
|
class FourOhForPage extends React.Component {
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<NavBar/>
|
||||||
|
<div className="row row--padded">
|
||||||
|
<h2>404</h2>
|
||||||
|
<p>That page does not exist</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default FourOhForPage;
|
|
@ -7,6 +7,7 @@ import PublishPage from 'components/PublishPage';
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
|||||||
import AboutPage from 'components/AboutPage';
|
import AboutPage from 'components/AboutPage';
|
||||||
import LoginPage from 'containers/LoginPage';
|
import LoginPage from 'containers/LoginPage';
|
||||||
import ShowPage from 'containers/ShowPage';
|
import ShowPage from 'containers/ShowPage';
|
||||||
|
import FourOhFourPage from 'components/FourOhFourPage';
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
|||||||
|
|
||||||
const Root = ({ store }) => (
|
const Root = ({ store }) => (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
|
@ -16,7 +17,8 @@ const Root = ({ store }) => (
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
|||||||
<Route exact path="/about" component={AboutPage} />
|
<Route exact path="/about" component={AboutPage} />
|
||||||
<Route exact path="/login" component={LoginPage} />
|
<Route exact path="/login" component={LoginPage} />
|
||||||
<Route exact path="/:identifier/:claim" component={ShowPage} />
|
<Route exact path="/:identifier/:claim" component={ShowPage} />
|
||||||
<Route exact path="/:claim/" component={ShowPage} />
|
<Route exact path="/:claim" component={ShowPage} />
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
|||||||
|
<Route component={FourOhFourPage} />
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
|||||||
</Switch>
|
</Switch>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
</Provider>
|
</Provider>
|
||||||
|
|
||||||
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a `Redirect` component or just a route with no `path` prop.
|
Probably worth adding a 404 page or just redirect to the homepage if it doesn't find a route. Either with a
Redirect
component or just a route with nopath
prop.