Skip to content

Commit

Permalink
CR: update
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed May 3, 2024
1 parent 025e7e3 commit 5cc0716
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const MnemonicWordInput = React.forwardRef<MnemonicWordInputRef, MnemonicWordInp
const inputRef = React.useRef<RNTextInput>(null)
const {styles} = useStyles()
const [word, setWord] = React.useState(mnemonicSelectedWords[index])
const [error, setError] = React.useState('')
const [error, setError] = React.useState(false)

React.useImperativeHandle(
ref,
Expand Down Expand Up @@ -235,15 +235,15 @@ const MnemonicWordInput = React.forwardRef<MnemonicWordInputRef, MnemonicWordInp
setSuggestedWords(suggestedWords)

if (suggestedWords.length <= 0) {
setError('error')
setError(true)
onError('error')
} else {
setError('')
setError(false)
onError('')
}
} else {
setSuggestedWords([])
setError('')
setError(false)
onError('')
}
},
Expand Down Expand Up @@ -272,7 +272,7 @@ const MnemonicWordInput = React.forwardRef<MnemonicWordInputRef, MnemonicWordInp
selectTextOnFocus
noHelper
errorDelay={0}
errorText={error}
errorText={error ? 'error' : ''}
autoCorrect={false}
spellCheck={false}
autoComplete="off"
Expand Down

0 comments on commit 5cc0716

Please sign in to comment.