File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ export const LoginForm = ({
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,13 +264,21 @@ export const LoginForm = ({
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 }
268
271
editable = { ! isProcessing }
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 ] } >
You can’t perform that action at this time.
0 commit comments