only lock register button before api call

This commit is contained in:
Julian 2023-04-26 15:19:22 -04:00
parent e8afec54b5
commit 0ed5d400b7
Signed by: NotNite
GPG Key ID: BD91A5402CCEB08A
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ export default function RootLayout({
<html lang="en">
<head>
<link rel="icon" href="/icon.svg" />
<meta property="og:image" content="/icon.svg" />
</head>
<body className={inter.className}>

View File

@ -64,7 +64,6 @@ export default function RegisterForm() {
<form
onSubmit={async (e) => {
e.preventDefault();
submitRef.current!.disabled = true;
const [username, displayName, email, password, confirmPassword] = [
usernameRef,
@ -88,6 +87,7 @@ export default function RegisterForm() {
return;
}
submitRef.current!.disabled = true;
const req = await fetch(`/api/register`, {
method: "POST",
headers: {