Validate TLD in signup (#5426)

* add lib

* add validation

* log

* add some common typos

* add tests

* reset hasWarned state on edit

* shorten path

* Move test file, adjust regex, add test

* Get real nit picky

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Hailey
2024-09-20 14:10:34 -07:00
committed by GitHub
parent e07f5d5980
commit c88b555410
6 changed files with 143 additions and 9 deletions
+3 -1
View File
@@ -15,6 +15,7 @@ export interface BackNextButtonsProps {
onBackPress: () => void
onNextPress?: () => void
onRetryPress?: () => void
overrideNextText?: string
}
export function BackNextButtons({
@@ -25,6 +26,7 @@ export function BackNextButtons({
onBackPress,
onNextPress,
onRetryPress,
overrideNextText,
}: BackNextButtonsProps) {
const {_} = useLingui()
@@ -63,7 +65,7 @@ export function BackNextButtons({
disabled={isLoading || isNextDisabled}
onPress={onNextPress}>
<ButtonText>
<Trans>Next</Trans>
{overrideNextText ? overrideNextText : <Trans>Next</Trans>}
</ButtonText>
{isLoading && <ButtonIcon icon={Loader} />}
</Button>