fix(editor): submission note sent as typed, copies purged again after sign-out
This commit is contained in:
1 parent
6471b25812
commit
5e0aa625a8
4 files changed
+22
-3
No files matched your search
@@ -36,12 +36,15 @@ export default function SignOutButton({
|
||||
|
||||
async function leave() {
|
||||
setBusy(true)
|
||||
const leavingUser = userId
|
||||
try {
|
||||
await signOut()
|
||||
} catch {
|
||||
// The local session is cleared either way; the server may not have revoked the others.
|
||||
window.alert(t('shell.sign_out_failed'))
|
||||
} finally {
|
||||
// An upload still in flight may have rewritten a copy before SIGNED_OUT landed.
|
||||
if (leavingUser) removeUserCopies(leavingUser)
|
||||
// The guard would redirect anyway; going home keeps the local tool one step away.
|
||||
navigate('/', { replace: true })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user