File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
packages/mobile-app/components/PinLockScreen Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,6 @@ export function PinLockScreen({ children }: { children?: React.ReactNode }) {
73
73
} ;
74
74
} , [ isLocked , resetLockTimeout ] ) ;
75
75
76
- const handlePinSubmit = ( ) => {
77
- if ( enteredPin === pin ) {
78
- setIsLocked ( false ) ;
79
- setEnteredPin ( "" ) ;
80
- setError ( null ) ;
81
- resetLockTimeout ( ) ;
82
- } else {
83
- setError ( "Incorrect PIN" ) ;
84
- setEnteredPin ( "" ) ;
85
- }
86
- } ;
87
-
88
76
return (
89
77
< TouchableWithoutFeedback onPress = { resetLockTimeout } >
90
78
< View style = { styles . container } >
@@ -104,7 +92,17 @@ export function PinLockScreen({ children }: { children?: React.ReactNode }) {
104
92
setError = { setError }
105
93
/>
106
94
< Button
107
- onPress = { handlePinSubmit }
95
+ onPress = { ( ) => {
96
+ if ( enteredPin === pin ) {
97
+ setIsLocked ( false ) ;
98
+ setEnteredPin ( "" ) ;
99
+ setError ( null ) ;
100
+ resetLockTimeout ( ) ;
101
+ } else {
102
+ setError ( "Incorrect PIN" ) ;
103
+ setEnteredPin ( "" ) ;
104
+ }
105
+ } }
108
106
disabled = { enteredPin . length !== pin . length }
109
107
>
110
108
Unlock
You can’t perform that action at this time.
0 commit comments