File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const AuthForm: React.FC<LoginFieldProps> = ({
2222 const [ email , setEmail ] = useState < string > ( '' ) ;
2323 const [ password , setPassword ] = useState < string > ( '' ) ;
2424 const [ staySignedIn , setStaySignedIn ] = useState < boolean > ( false )
25- const [ modalVisible , setModalVisible ] = useState ( false ) ;
25+ const [ modalVisible , setModalVisible ] = useState < boolean > ( false ) ;
2626
2727 const { signin } = useContext ( AuthContext ) ;
2828
@@ -34,14 +34,11 @@ const AuthForm: React.FC<LoginFieldProps> = ({
3434 }
3535 } ;
3636
37- const handleStaySignInToggle = ( ) => {
38- if ( staySignedIn ) {
39- setStaySignedIn ( false )
40- } else {
41- setStaySignedIn ( true )
42- setModalVisible ( true )
43- }
44- }
37+ const handleStaySignInToggle = ( ) => {
38+ setStaySignedIn ( ! staySignedIn ) ;
39+ if ( ! staySignedIn ) setModalVisible ( true ) ;
40+ } ;
41+
4542 return (
4643 < >
4744 < TextInput
You can’t perform that action at this time.
0 commit comments