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`
67
67
background-color: ${ ( { kind } ) =>
68
68
prop ( `Button.${ kind } .disabled.background` ) } ;
69
69
border-color: ${ ( { kind } ) => prop ( `Button.${ kind } .disabled.border` ) } ;
70
+ cursor: not-allowed;
70
71
}
71
72
svg * {
72
73
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';
7
7
import { validateAndLoginUser } from '../actions' ;
8
8
9
9
function LoginForm ( ) {
10
- const [ contentPresent , setContentPresent ] = useState ( false ) ;
11
10
const { t } = useTranslation ( ) ;
12
11
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
-
27
12
const dispatch = useDispatch ( ) ;
28
13
function onSubmit ( formProps ) {
29
14
return dispatch ( validateAndLoginUser ( formProps ) ) ;
@@ -86,10 +71,7 @@ function LoginForm() {
86
71
{ submitError && ! modifiedSinceLastSubmit && (
87
72
< span className = "form-error" > { submitError } </ span >
88
73
) }
89
- < Button
90
- type = "submit"
91
- disabled = { ( submitting || pristine ) && ! contentPresent }
92
- >
74
+ < Button type = "submit" disabled = { submitting } >
93
75
{ t ( 'LoginForm.Submit' ) }
94
76
</ Button >
95
77
</ form >
You can’t perform that action at this time.
0 commit comments