aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-01-27 14:15:22 +0100
committerlonkaars <l.leblansch@gmail.com>2021-01-27 14:15:22 +0100
commit0a41096fa8aa3b02c13478caf27ee60ffb840b80 (patch)
treebf47d95b2c921b2d2ad7bafdc9117c053060c1d8 /pages
parent6a4a2b900994f83ee284de7be10fbd57dc1b6cb3 (diff)
static id's on register page
Diffstat (limited to 'pages')
-rw-r--r--pages/register.tsx18
1 files changed, 6 insertions, 12 deletions
diff --git a/pages/register.tsx b/pages/register.tsx
index e0f98de..6e2c73f 100644
--- a/pages/register.tsx
+++ b/pages/register.tsx
@@ -6,17 +6,11 @@ import { v4 as uuidv4 } from 'uuid';
import { validate as validateEmail } from 'email-validator';
import axios from 'axios';
-var ids = {
- username: uuidv4(),
- email: uuidv4(),
- password: uuidv4()
-}
-
function submitRegister() {
var formData = {
- username: (document.getElementById(ids.username) as HTMLInputElement).value,
- email: (document.getElementById(ids.email) as HTMLInputElement).value,
- password: (document.getElementById(ids.password) as HTMLInputElement).value
+ username: (document.getElementById("username") as HTMLInputElement).value,
+ email: (document.getElementById("email") as HTMLInputElement).value,
+ password: (document.getElementById("password") as HTMLInputElement).value
}
if ( !formData.username ||
@@ -85,9 +79,9 @@ export default function RegisterPage() {
}}>
<Vierkant>
<form>
- <Input id={ids.username} label="gebruikersnaam" style={{ marginBottom: 12 }}></Input>
- <Input id={ids.email} label="email" style={{ marginBottom: 12 }}></Input>
- <Input id={ids.password} label="wachtwoord" type="password"></Input>
+ <Input id="username" label="gebruikersnaam" style={{ marginBottom: 12 }}></Input>
+ <Input id="email" label="email" style={{ marginBottom: 12 }}></Input>
+ <Input id="password" label="wachtwoord" type="password"></Input>
<Button text="Registreren" style={{ marginTop: 24 }} onclick={submitRegister}></Button>
</form>
</Vierkant>