1
0
Fork 0

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 untrusted user: 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"> <html lang="en">
<head> <head>
<link rel="icon" href="/icon.svg" /> <link rel="icon" href="/icon.svg" />
<meta property="og:image" content="/icon.svg" />
</head> </head>
<body className={inter.className}> <body className={inter.className}>

View File

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