+10
src/screens/Login/LoginForm.tsx
+10
src/screens/Login/LoginForm.tsx
···
60
60
const [isProcessing, setIsProcessing] = useState<boolean>(false)
61
61
const [isAuthFactorTokenNeeded, setIsAuthFactorTokenNeeded] =
62
62
useState<boolean>(false)
63
+
const [isAuthFactorTokenValueEmpty, setIsAuthFactorTokenValueEmpty] =
64
+
useState<boolean>(true)
63
65
const identifierValueRef = useRef<string>(initialHandle || '')
64
66
const passwordValueRef = useRef<string>('')
65
67
const authFactorTokenValueRef = useRef<string>('')
···
262
264
textContentType="username"
263
265
blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field
264
266
onChangeText={v => {
267
+
setIsAuthFactorTokenValueEmpty(v === '')
265
268
authFactorTokenValueRef.current = v
266
269
}}
267
270
onSubmitEditing={onPressNext}
···
269
272
accessibilityHint={_(
270
273
msg`Input the code which has been emailed to you`,
271
274
)}
275
+
style={[
276
+
{
277
+
textTransform: isAuthFactorTokenValueEmpty
278
+
? 'none'
279
+
: 'uppercase',
280
+
},
281
+
]}
272
282
/>
273
283
</TextField.Root>
274
284
<Text style={[a.text_sm, t.atoms.text_contrast_medium, a.mt_sm]}>