Skip to content

Commit

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

Fixes coala#137
  • Loading branch information
Aditya Agarwal authored and aditya81070 committed Sep 29, 2018
1 parent f08f19b commit 565f966
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) => browserHistory.push('/')
onEnter: () => browserHistory.push('/')
},
{ path: '/',
component: App,
Expand Down

0 comments on commit 565f966

Please sign in to comment.