From d09f4fd762e69de62711fc07a94763b9e48e3900 Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 15 Nov 2024 17:04:14 -0800 Subject: [PATCH] tweak wording --- src/components/dialogs/VerifyEmailDialog.tsx | 65 +++++++++++++------- src/lib/hooks/useEmail.ts | 7 ++- 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/src/components/dialogs/VerifyEmailDialog.tsx b/src/components/dialogs/VerifyEmailDialog.tsx index d4412b6f89..30b11d188e 100644 --- a/src/components/dialogs/VerifyEmailDialog.tsx +++ b/src/components/dialogs/VerifyEmailDialog.tsx @@ -146,18 +146,17 @@ export function Inner({ ) : null} - - {currentStep === 'StepOne' ? ( - <> - {!reasonText ? ( - <> - - You'll receive an email at{' '} - - {currentAccount?.email} - {' '} - to verify it's you. - {' '} + {currentStep === 'StepOne' ? ( + + {reasonText ? ( + + {reasonText} + + Don't have access to{' '} + + {currentAccount?.email} + + ?{' '} - Need to change it? + Change your email address - - ) : ( - reasonText - )} - - ) : ( + . + + + ) : ( + + + You'll receive an email at{' '} + + {currentAccount?.email} + {' '} + to verify it's you. + {' '} + { + e.preventDefault() + control.close(() => { + openModal({name: 'change-email'}) + }) + return false + }}> + Need to change it? + + + )} + + ) : ( + uiStrings[currentStep].message - )} - + + )} {currentStep === 'StepTwo' ? ( diff --git a/src/lib/hooks/useEmail.ts b/src/lib/hooks/useEmail.ts index 6e52846d12..b3ba8d1982 100644 --- a/src/lib/hooks/useEmail.ts +++ b/src/lib/hooks/useEmail.ts @@ -8,12 +8,15 @@ export function useEmail() { const {data: serviceConfig} = useServiceConfigQuery() + const checkEmailConfirmed = !!serviceConfig?.checkEmailConfirmed + const isSelfHost = - serviceConfig?.checkEmailConfirmed && currentAccount && getHostnameFromUrl(currentAccount.service) !== getHostnameFromUrl(BSKY_SERVICE) - const needsEmailVerification = !isSelfHost && !currentAccount?.emailConfirmed + + const needsEmailVerification = + checkEmailConfirmed && !isSelfHost && !currentAccount?.emailConfirmed return {needsEmailVerification} }