chore: update all dependencies (#699)

This commit is contained in:
Mo
2021-10-22 14:47:41 -05:00
committed by GitHub
parent fcc22ffb78
commit 413fe47828
38 changed files with 2767 additions and 4029 deletions

View File

@@ -28,12 +28,12 @@ export const CreateAccount: FunctionComponent<Props> = observer(
const [isEmailInvalid, setIsEmailInvalid] = useState(false);
const [isPasswordNotMatching, setIsPasswordNotMatching] = useState(false);
const emailInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>();
const confirmPasswordInputRef = useRef<HTMLInputElement>();
const emailInputRef = useRef<HTMLInputElement>(null);
const passwordInputRef = useRef<HTMLInputElement>(null);
const confirmPasswordInputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (emailInputRef.current) emailInputRef.current.focus();
if (emailInputRef.current) emailInputRef.current!.focus();
}, []);
const handleEmailChange = (e: Event) => {
@@ -62,30 +62,30 @@ export const CreateAccount: FunctionComponent<Props> = observer(
const handleCreateAccount = async () => {
if (!email) {
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!isEmailValid(email)) {
setIsEmailInvalid(true);
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!password) {
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
return;
}
if (!confirmPassword) {
confirmPasswordInputRef?.current.focus();
confirmPasswordInputRef?.current!.focus();
return;
}
if (password !== confirmPassword) {
setConfirmPassword('');
setIsPasswordNotMatching(true);
confirmPasswordInputRef?.current.focus();
confirmPasswordInputRef?.current!.focus();
return;
}

View File

@@ -27,11 +27,11 @@ export const SignIn: FunctionComponent<Props> = observer(
const [isPasswordInvalid, setIsPasswordInvalid] = useState(false);
const [otherErrorMessage, setOtherErrorMessage] = useState('');
const emailInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>();
const emailInputRef = useRef<HTMLInputElement>(null);
const passwordInputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (emailInputRef.current) emailInputRef.current.focus();
if (emailInputRef.current) emailInputRef.current!.focus();
}, []);
const handleEmailChange = (e: Event) => {
@@ -56,18 +56,18 @@ export const SignIn: FunctionComponent<Props> = observer(
const handleSignIn = async () => {
if (!email) {
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!isEmailValid(email)) {
setIsEmailInvalid(true);
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!password) {
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
return;
}