Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
- extend routes #1878
Browse files Browse the repository at this point in the history
- link to reset password
  • Loading branch information
siemiatj committed Aug 7, 2018
1 parent 0435087 commit e4320e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/components/app/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ class LoginForm extends Component {
};

handleForgotPassword = () => {
console.log('clicked')
}
const { dispatch } = this.props;
dispatch(push('/login/forgottenPassword'));
};

openDropdown = () => {
this.setState({
Expand Down
17 changes: 10 additions & 7 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,18 @@ export const getRoutes = (store, auth, plugins) => {
<IndexRoute component={Dashboard} />
</Route>
<Route
path="/login"
component={nextState => (
<Login
redirect={nextState.location.query.redirect}
path="/login*"
component={({ location, routeParams }) => {
console.log('NEXTSTATE: ', location, routeParams)
return (<Login
splat={routeParams.splat.replace('/', '')}
redirect={location.query.redirect}
logged={localStorage.isLogged}
{...{ auth }}
/>
)}
/>
/>);
}}
>
</Route>
<Route path="*" component={NoMatch} />
</Route>
);
Expand Down

0 comments on commit e4320e1

Please sign in to comment.