Fix login/register
This commit is contained in:
parent
4b0bb13f1e
commit
ed4ddc8e8c
1 changed files with 5 additions and 2 deletions
|
@ -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 (
|
||||
|
|
Loading…
Reference in a new issue