Closed kamalpanhwar closed 5 years ago
I solved it by using other codes and browserHistory.
authenticationService.login(email, password)
.then( user => {
const { from } = this.props.location.state || { from: { pathname: "/" } };
browserHistory.push(from);·
},
error => {
-- return <Redirect to='/login' />,
console.log(error);
}
);
I am using this theme, but I have no idea how can I redirect my user to other page after signin? or if user is not authenticated how can I redirect to sign. I tried many methods but could not work out. Example
I also tried following code
It gave error and not working.