From f83cc00a9588238b7c916df6a1f227e5c0320f9c Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 8 Dec 2023 12:35:01 -0600 Subject: [PATCH] Add comment --- src/view/com/modals/SwitchAccount.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/view/com/modals/SwitchAccount.tsx b/src/view/com/modals/SwitchAccount.tsx index 43bdce8af9..37691e7172 100644 --- a/src/view/com/modals/SwitchAccount.tsx +++ b/src/view/com/modals/SwitchAccount.tsx @@ -38,9 +38,8 @@ function SwitchAccountCard({account}: {account: SessionAccount}) { const onPressSignout = React.useCallback(() => { track('Settings:SignOutButtonClicked') closeAllActiveElements() - setTimeout(() => { - logout() - }, 0) + // needs to be in timeout or the modal re-opens + setTimeout(() => logout(), 0) }, [track, logout, closeAllActiveElements]) const contents = (