Skip to content

Commit

Permalink
router.jsx: Remove unused state & replace parameter
Browse files Browse the repository at this point in the history
The two arguments `state` and `replace` in `onEnter` are not required.
In the route when `/dashboard` matches, it is directed to `/` using
browserHistory.push().

Closes coala#137
  • Loading branch information
GeniusLearner committed Sep 8, 2019
1 parent bc76028 commit a4bf4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {parseRoute, buildRoute} from './route-utils';
const routes = [
// Redirect from `/dashboard` to `/`
{ path: '/dashboard',
onEnter: (state, replace) => history.push('/')
onEnter: () => history.push('/')
},
{ path: '/',
component: App,
Expand Down

0 comments on commit a4bf4e9

Please sign in to comment.