Fix login/register

This commit is contained in:
Robert Long 2021-07-27 12:40:23 -07:00
parent 4b0bb13f1e
commit ed4ddc8e8c

View file

@ -24,12 +24,15 @@ export function LoginOrRegister({ onRegister, onLogin }) {
const onSubmitRegisterForm = useCallback((e) => {
e.preventDefault();
onRegister(usernameRef.current.value, passwordRef.current.value);
onRegister(
registerUsernameRef.current.value,
registerPasswordRef.current.value
);
});
const onSubmitLoginForm = useCallback((e) => {
e.preventDefault();
onLogin(usernameRef.current.value, passwordRef.current.value);
onLogin(loginUsernameRef.current.value, loginPasswordRef.current.value);
});
return (