mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 00:48:25 +00:00
Bugfix: Redirecting to /login instead of / (#1419)
* after correct creds are provided should not redirected to '/login' instead should redirect to '/' * resolved conflicts
This commit is contained in:
parent
4d01aa31a1
commit
07572e6ce5
1 changed files with 2 additions and 1 deletions
|
|
@ -52,7 +52,8 @@ class LoginPage extends React.Component {
|
|||
authSuccessHandler = () => {
|
||||
const params = queryString.parse(this.props.location.search);
|
||||
const { from } = params.redirectTo ? { from: { pathname: params.redirectTo } } : { from: { pathname: '/' } };
|
||||
this.props.history.push(from);
|
||||
const redirectPath = from.pathname === '/login' ? '/' : from;
|
||||
this.props.history.push(redirectPath);
|
||||
this.setState({ isLoading: false });
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue