From b9fc1527495f8a9ed792cf4563650a9f442d62a1 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 28 Dec 2023 19:05:17 -0800 Subject: [PATCH] Remove the KeyboardAvoidingView in account creation (close #2333) (#2366) * Remove the keyboardavoidingview in account creation (close #2333) * Smaller pad on desktop/tablet --- src/view/com/auth/create/CreateAccount.tsx | 109 ++++++++++----------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/src/view/com/auth/create/CreateAccount.tsx b/src/view/com/auth/create/CreateAccount.tsx index a89e6fb3..74307a63 100644 --- a/src/view/com/auth/create/CreateAccount.tsx +++ b/src/view/com/auth/create/CreateAccount.tsx @@ -1,7 +1,6 @@ import React from 'react' import { ActivityIndicator, - KeyboardAvoidingView, ScrollView, StyleSheet, TouchableOpacity, @@ -28,6 +27,7 @@ import {IS_PROD} from '#/lib/constants' import {Step1} from './Step1' import {Step2} from './Step2' import {Step3} from './Step3' +import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' export function CreateAccount({onPressBack}: {onPressBack: () => void}) { const {screen} = useAnalytics() @@ -38,6 +38,7 @@ export function CreateAccount({onPressBack}: {onPressBack: () => void}) { const {createAccount} = useSessionApi() const {mutate: setBirthDate} = usePreferencesSetBirthDateMutation() const {mutate: setSavedFeeds} = useSetSaveFeedsMutation() + const {isTabletOrDesktop} = useWebMediaQueries() React.useEffect(() => { screen('CreateAccount') @@ -120,64 +121,62 @@ export function CreateAccount({onPressBack}: {onPressBack: () => void}) { title={_(msg`Create Account`)} description={_(msg`We're so excited to have you join us!`)}> - - - {uiState.step === 1 && ( - - )} - {uiState.step === 2 && ( - - )} - {uiState.step === 3 && ( - - )} - - + + {uiState.step === 1 && ( + + )} + {uiState.step === 2 && ( + + )} + {uiState.step === 3 && ( + + )} + + + + + Back + + + + {uiState.canNext ? ( - - Back + {uiState.isProcessing ? ( + + ) : ( + + Next + + )} + + ) : serviceInfoError ? ( + refetchServiceInfo()} + accessibilityRole="button" + accessibilityLabel={_(msg`Retry`)} + accessibilityHint="" + accessibilityLiveRegion="polite"> + + Retry - - {uiState.canNext ? ( - - {uiState.isProcessing ? ( - - ) : ( - - Next - - )} - - ) : serviceInfoError ? ( - refetchServiceInfo()} - accessibilityRole="button" - accessibilityLabel={_(msg`Retry`)} - accessibilityHint="" - accessibilityLiveRegion="polite"> - - Retry - - - ) : serviceInfoIsFetching ? ( - <> - - - Connecting... - - - ) : undefined} - - - + ) : serviceInfoIsFetching ? ( + <> + + + Connecting... + + + ) : undefined} + + )