diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 20:56:13 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 20:56:13 +0000 |
commit | b226f41560f2e78d9148ec6e034fb0c00e25422a (patch) | |
tree | bcb0fc5dbdcebf907751ee7b0da7d90b5200da13 | |
parent | 10943b4ff469ab540a7f28647688a3fd3001d5b4 (diff) | |
download | voidsky-b226f41560f2e78d9148ec6e034fb0c00e25422a.tar.zst |
use in-button spinner instead of activity indicator
-rw-r--r-- | src/screens/Login/LoginForm.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index ee47aa41d..eddcc9678 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -16,7 +16,7 @@ import {isNetworkError} from 'lib/strings/errors' import {useSessionApi} from '#/state/session' import {cleanError} from 'lib/strings/errors' import {logger} from '#/logger' -import {Button, ButtonText} from '#/components/Button' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {atoms as a, useTheme} from '#/alf' import {Text} from '#/components/Typography' import * as TextField from '#/components/forms/TextField' @@ -25,6 +25,7 @@ import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock' import {HostingProvider} from '#/components/forms/HostingProvider' import {FormContainer} from './FormContainer' import {FormError} from '#/components/forms/FormError' +import {Loader} from '#/components/Loader' type ServiceDescription = ComAtprotoServerDescribeServer.OutputSchema @@ -64,6 +65,7 @@ export const LoginForm = ({ }, [track]) const onPressNext = async () => { + if (isProcessing) return Keyboard.dismiss() setError('') setIsProcessing(true) @@ -237,8 +239,6 @@ export const LoginForm = ({ <Trans>Connecting...</Trans> </Text> </> - ) : isProcessing ? ( - <ActivityIndicator /> ) : isReady ? ( <Button label={_(msg`Next`)} @@ -250,6 +250,7 @@ export const LoginForm = ({ <ButtonText> <Trans>Next</Trans> </ButtonText> + {isProcessing && <ButtonIcon icon={Loader} />} </Button> ) : undefined} </View> |