feat(mobile): optimize verification email sending

This commit is contained in:
DIYgod 2025-03-26 19:52:12 +08:00
parent 9bb723a33b
commit 680a0fd7db
No known key found for this signature in database
1 changed files with 12 additions and 1 deletions

View File

@ -44,6 +44,8 @@ export const EditEmailScreen: NavigationControllerView = () => {
},
})
const [isSendingVerificationEmail, setIsSendingVerificationEmail] = useState(false)
return (
<SafeNavigationScrollView className="bg-system-grouped-background">
<NavigationBlurEffectHeader
@ -83,7 +85,16 @@ export const EditEmailScreen: NavigationControllerView = () => {
{!isValidate && (
<GroupedInsetListCard className="mt-6">
<GroupedPlainButtonCell label="Send Verification Email" />
<GroupedPlainButtonCell
disabled={isSendingVerificationEmail}
label={
isSendingVerificationEmail ? "Verification Email Sent" : "Send Verification Email"
}
onPress={() => {
setIsSendingVerificationEmail(true)
userSyncService.sendVerificationEmail()
}}
/>
</GroupedInsetListCard>
)}
</View>