React router #343

Merged
bones7242 merged 96 commits from react-router into master 2018-02-15 08:02:17 +01:00
2 changed files with 21 additions and 1 deletions
Showing only changes of commit 7cc78e9187 - Show all commits

View 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;

View file

@ -7,6 +7,7 @@ import PublishPage from 'components/PublishPage';
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 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';
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
const Root = ({ store }) => ( const Root = ({ store }) => (
<Provider store={store}> <Provider store={store}>
@ -16,7 +17,8 @@ const Root = ({ store }) => (
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 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} />
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
<Route component={FourOhFourPage} />
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
</Switch> </Switch>
</BrowserRouter> </BrowserRouter>
</Provider> </Provider>

neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.
neb-b commented 2018-02-05 20:10:19 +01:00 (Migrated from github.com)
Review

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 no `path` prop.