From e878da04a1f84e1b64caf18ecf5b60ee1c583d85 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 10 Oct 2023 14:02:31 -0700 Subject: [PATCH] Fix keyboard double pad issue in email change & verify modals (#1664) --- src/view/com/modals/ChangeEmail.tsx | 244 +++++++++++------------ src/view/com/modals/VerifyEmail.tsx | 299 ++++++++++++++-------------- 2 files changed, 259 insertions(+), 284 deletions(-) diff --git a/src/view/com/modals/ChangeEmail.tsx b/src/view/com/modals/ChangeEmail.tsx index c92dabdc..01257055 100644 --- a/src/view/com/modals/ChangeEmail.tsx +++ b/src/view/com/modals/ChangeEmail.tsx @@ -1,11 +1,5 @@ import React, {useState} from 'react' -import { - ActivityIndicator, - KeyboardAvoidingView, - SafeAreaView, - StyleSheet, - View, -} from 'react-native' +import {ActivityIndicator, SafeAreaView, StyleSheet, View} from 'react-native' import {ScrollView, TextInput} from './util' import {observer} from 'mobx-react-lite' import {Text} from '../util/text/Text' @@ -101,142 +95,134 @@ export const Component = observer(function Component({}: {}) { } return ( - - - - - - {stage === Stages.InputEmail ? 'Change Your Email' : ''} - {stage === Stages.ConfirmCode ? 'Security Step Required' : ''} - {stage === Stages.Done ? 'Email Updated' : ''} - - - - - {stage === Stages.InputEmail ? ( - <>Enter your new email address below. - ) : stage === Stages.ConfirmCode ? ( - <> - An email has been sent to your previous address,{' '} - {store.session.currentSession?.email || ''}. It includes a - confirmation code which you can enter below. - - ) : ( - <> - Your email has been updated but not verified. As a next step, - please verify your new email. - - )} + + + + + {stage === Stages.InputEmail ? 'Change Your Email' : ''} + {stage === Stages.ConfirmCode ? 'Security Step Required' : ''} + {stage === Stages.Done ? 'Email Updated' : ''} + - {stage === Stages.InputEmail && ( - - )} - {stage === Stages.ConfirmCode && ( - + + {stage === Stages.InputEmail ? ( + <>Enter your new email address below. + ) : stage === Stages.ConfirmCode ? ( + <> + An email has been sent to your previous address,{' '} + {store.session.currentSession?.email || ''}. It includes a + confirmation code which you can enter below. + + ) : ( + <> + Your email has been updated but not verified. As a next step, + please verify your new email. + )} + - {error ? ( - - ) : undefined} + {stage === Stages.InputEmail && ( + + )} + {stage === Stages.ConfirmCode && ( + + )} - - {isProcessing ? ( - - - - ) : ( - - {stage === Stages.InputEmail && ( -