about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-03-20 15:58:54 +0000
committerSamuel Newman <mozzius@protonmail.com>2024-03-20 15:58:54 +0000
commita0839723eebcae26fee0ccf09cc19d0bf6929dbf (patch)
tree2311e9063a4ec814d51a6a7ff8af1df06fac2300 /src
parent6d1307fdc742a34d390440b7ab9765f349347c84 (diff)
downloadvoidsky-a0839723eebcae26fee0ccf09cc19d0bf6929dbf.tar.zst
login form back button goes to chooseaccount conditionally
Diffstat (limited to 'src')
-rw-r--r--src/screens/Login/index.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/screens/Login/index.tsx b/src/screens/Login/index.tsx
index f7a0e29e9..0328f8783 100644
--- a/src/screens/Login/index.tsx
+++ b/src/screens/Login/index.tsx
@@ -106,7 +106,9 @@ export const Login = ({onPressBack}: {onPressBack: () => void}) => {
           initialHandle={initialHandle}
           setError={setError}
           setServiceUrl={setServiceUrl}
-          onPressBack={onPressBack}
+          onPressBack={() =>
+            accounts.length ? gotoForm(Forms.ChooseAccount) : onPressBack()
+          }
           onPressForgotPassword={onPressForgotPassword}
           onPressRetryConnect={refetchService}
         />