Skip to content

Commit f8d8753

Browse files
committed
Make the router stricter
1 parent b2fa5fd commit f8d8753

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

client/src/routes/book.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Route } from 'react-router-dom';
33
import { List, Create, Update, Show } from '../components/book/';
44

55
export default [
6-
<Route path="/books/create" component={Create} exact={true} key="create" />,
7-
<Route path="/books/edit/:id" component={Update} exact={true} key="update" />,
8-
<Route path="/books/show/:id" component={Show} exact={true} key="show" />,
9-
<Route path="/books/:page?" component={List} strict={true} key="list" />
6+
<Route path="/books/create" component={Create} exact key="create" />,
7+
<Route path="/books/edit/:id" component={Update} exact key="update" />,
8+
<Route path="/books/show/:id" component={Show} exact key="show" />,
9+
<Route path="/books/" component={List} exact strict key="list" />,
10+
<Route path="/books/:page" component={List} exact strict key="page" />
1011
];

0 commit comments

Comments
 (0)