Minor fixes

This commit is contained in:
Mattias 2024-03-17 16:24:09 +01:00
parent 9dd47f3d71
commit 81893ae3e8

View file

@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { NewUser } from "../Types/Users"; import { NewUser } from "../Types/goTypes";
import { api } from "../API/API"; import { api } from "../API/API";
import Logo from "../assets/Logo.svg"; import Logo from "../assets/Logo.svg";
import Button from "./Button"; import Button from "./Button";
@ -35,12 +35,11 @@ export default function Register(): JSX.Element {
const [password, setPassword] = useState(""); const [password, setPassword] = useState("");
const handleRegister = async (): Promise<void> => { const handleRegister = async (): Promise<void> => {
const newUser: NewUser = { userName: username, password }; const newUser: NewUser = { username: username, password };
await api.registerUser(newUser); // TODO: Handle errors await api.registerUser(newUser); // TODO: Handle errors
}; };
return ( return (
<div className="flex flex-col h-fit w-screen items-center justify-center">
<div className="flex flex-col h-fit w-screen items-center justify-center"> <div className="flex flex-col h-fit w-screen items-center justify-center">
<div className="border-4 border-black bg-white flex flex-col items-center justify-center h-fit w-fit rounded-3xl content-center pl-20 pr-20"> <div className="border-4 border-black bg-white flex flex-col items-center justify-center h-fit w-fit rounded-3xl content-center pl-20 pr-20">
<form <form