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">
|
<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}>
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue