Skip to content

Commit

Permalink
Keep loading spinner during redirect (ohcnetwork#3754)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored and rithviknishad committed Oct 22, 2022
1 parent e0f215e commit 22b34bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ export const Login = () => {
window.location.pathname === "/" ||
window.location.pathname === "/login"
) {
navigate("/facility");
window.location.href = "/facility";
} else {
navigate(window.location.pathname.toString());
window.location.href = window.location.pathname.toString();
}
window.location.reload();
} else {
// error from server set back to login button
setLoading(false);
Expand Down

0 comments on commit 22b34bf

Please sign in to comment.