fix: weird redirection in index page (#801)
This commit is contained in:
parent
9196fb4562
commit
db488338fb
2 changed files with 31 additions and 24 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue