File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ const StyledButton = styled.button`
6767 background-color: ${ ( { kind } ) =>
6868 prop ( `Button.${ kind } .disabled.background` ) } ;
6969 border-color: ${ ( { kind } ) => prop ( `Button.${ kind } .disabled.border` ) } ;
70+ cursor: not-allowed;
7071 }
7172 svg * {
7273 fill: ${ ( { kind } ) => prop ( `Button.${ kind } .disabled.foreground` ) } ;
Original file line number Diff line number Diff line change @@ -7,23 +7,8 @@ import { validateLogin } from '../../../utils/reduxFormUtils';
77import { validateAndLoginUser } from '../actions' ;
88
99function LoginForm ( ) {
10- const [ contentPresent , setContentPresent ] = useState ( false ) ;
1110 const { t } = useTranslation ( ) ;
1211
13- useEffect ( ( ) => {
14- const checkEmailElement = ( ) => {
15- if (
16- document . getElementById ( 'email' ) &&
17- document . getElementById ( 'password' )
18- ) {
19- setContentPresent ( true ) ;
20- } else {
21- setContentPresent ( false ) ;
22- }
23- } ;
24- checkEmailElement ( ) ;
25- } , [ ] ) ;
26-
2712 const dispatch = useDispatch ( ) ;
2813 function onSubmit ( formProps ) {
2914 return dispatch ( validateAndLoginUser ( formProps ) ) ;
@@ -86,10 +71,7 @@ function LoginForm() {
8671 { submitError && ! modifiedSinceLastSubmit && (
8772 < span className = "form-error" > { submitError } </ span >
8873 ) }
89- < Button
90- type = "submit"
91- disabled = { ( submitting || pristine ) && ! contentPresent }
92- >
74+ < Button type = "submit" disabled = { submitting } >
9375 { t ( 'LoginForm.Submit' ) }
9476 </ Button >
9577 </ form >
You can’t perform that action at this time.
0 commit comments