diff options
author | dan <dan.abramov@gmail.com> | 2024-08-15 20:58:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 20:58:13 +0100 |
commit | b6e515c664d51ffe357c3562fd514301805ade8c (patch) | |
tree | ac0193c172d6c7ef62ac59d411c2dfc7ae1614c3 /src/screens/Deactivated.tsx | |
parent | f3b57dd45600c0c8197ce45a0f927b57e0799760 (diff) | |
download | voidsky-b6e515c664d51ffe357c3562fd514301805ade8c.tar.zst |
Move global "Sign out" out of the current account row (#4941)
* Rename logout to logoutEveryAccount * Add logoutCurrentAccount() * Make all "Log out" buttons refer to current account Each of these usages is completely contextual and refers to a specific account. * Add Sign out of all accounts to Settings * Move single account Sign Out below as well * Prompt on account removal * Add Other Accounts header to reduce ambiguity * Spacing fix --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/screens/Deactivated.tsx')
-rw-r--r-- | src/screens/Deactivated.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screens/Deactivated.tsx b/src/screens/Deactivated.tsx index add550f93..997fe419e 100644 --- a/src/screens/Deactivated.tsx +++ b/src/screens/Deactivated.tsx @@ -38,7 +38,7 @@ export function Deactivated() { const {setShowLoggedOut} = useLoggedOutViewControls() const hasOtherAccounts = accounts.length > 1 const setMinimalShellMode = useSetMinimalShellMode() - const {logout} = useSessionApi() + const {logoutCurrentAccount} = useSessionApi() const agent = useAgent() const [pending, setPending] = React.useState(false) const [error, setError] = React.useState<string | undefined>() @@ -72,8 +72,8 @@ export function Deactivated() { // So we change the URL ourselves. The navigator will pick it up on remount. history.pushState(null, '', '/') } - logout('Deactivated') - }, [logout]) + logoutCurrentAccount('Deactivated') + }, [logoutCurrentAccount]) const handleActivate = React.useCallback(async () => { try { |