forked from NotNet/gluestick
only lock register button before api call
This commit is contained in:
parent
e8afec54b5
commit
0ed5d400b7
|
@ -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}>
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue