Skip to content

Commit 31a18c6

Browse files
committed
Bug fixes
1 parent 507093d commit 31a18c6

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

client/common/Button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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`)};

client/modules/User/components/LoginForm.jsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,8 @@ import { validateLogin } from '../../../utils/reduxFormUtils';
77
import { validateAndLoginUser } from '../actions';
88

99
function 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>

0 commit comments

Comments
 (0)