Skip to content

Commit

Permalink
#Routes: adding swicth in routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Danjavia committed Apr 18, 2017
1 parent ea284c9 commit 1677b86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starterpack",
"version": "1.0.0",
"version": "2.0.0",
"devDependencies": {
"react-scripts": "0.8.4",
"sw-precache": "^4.2.3"
Expand Down
8 changes: 5 additions & 3 deletions src/routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External libraries
**/
import React from 'react';
import { Route } from 'react-router-dom';
import { Route, Switch } from 'react-router-dom';

/**
* Internal Resources
Expand All @@ -16,7 +16,9 @@ import NotFound from '../pages/NotFound/NotFound';
**/
export default () => (
<div className="container">
<Route exact path="/" component={HomePage} />
<Route path="*" component={NotFound} />
<Switch>
<Route exact path="/" component={HomePage} />
<Route component={NotFound} />
</Switch>
</div>
);

0 comments on commit 1677b86

Please sign in to comment.