Skip to content

Commit

Permalink
Merge pull request #18091 from jeclrsg/hpcc-30934-eclwatch-v9-unlock-…
Browse files Browse the repository at this point in the history
…redirect

HPCC-30934 ECL Watch v9 fix unlock page redirect
  • Loading branch information
GordonSmith authored Nov 30, 2023
2 parents 363512b + a30f6b0 commit 4f0e084
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion esp/src/src-react/components/forms/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export const Login: React.FunctionComponent<LoginProps> = ({
cookies["ESPAuthenticated"] = "true";
createUserSession(cookies).then(() => {
setErrorMessage("");
replaceUrl("/", null, true);
const lastUrl = window.localStorage.getItem("pageOnLock") ?? "/";
window.localStorage.removeItem("pageOnLock");
replaceUrl(lastUrl, true);
}).catch(err => logger.error("Unable to create user session."));
}
}
Expand Down

0 comments on commit 4f0e084

Please sign in to comment.