fix: weird redirection in index page (#801)

This commit is contained in:
Dakshesh Jain 2023-04-12 19:03:08 +05:30 committed by GitHub
parent 9196fb4562
commit db488338fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 24 deletions

View file

@ -67,19 +67,17 @@ export const WorkspaceSidebarDropdown = () => {
};
const handleSignOut = async () => {
await authenticationService
.signOut()
.catch(() =>
setToastAlert({
type: "error",
title: "Error!",
message: "Failed to sign out. Please try again.",
})
)
.finally(() => {
router.push("/signin");
mutateUser();
});
router.push("/signin").then(() => {
mutateUser();
});
await authenticationService.signOut().catch(() =>
setToastAlert({
type: "error",
title: "Error!",
message: "Failed to sign out. Please try again.",
})
);
};
return (