-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
réglage onChangeEvent + form terminer en attente api
- Loading branch information
1 parent
ae26617
commit 4f78f89
Showing
5 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
/out/ | ||
|
||
|
||
|
||
/build/ | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,48 @@ | ||
"use client" | ||
import usernameSvg from "@/assets/username.svg" | ||
import InputLoginButton from "@/components/inputs/InputLoginButtons" | ||
import { ChangeEvent, FormEvent, useState } from "react" | ||
|
||
|
||
export default function Register() { | ||
const [email, setEmail] = useState<string>("") | ||
const [username, setUsername] = useState<string>("") | ||
const [password, setPassword] = useState<string>("") | ||
|
||
function onUsernameChange(event: ChangeEvent<HTMLInputElement>){ | ||
setUsername(event.target.value) | ||
} | ||
function onPasswordChange(event: ChangeEvent<HTMLInputElement>){ | ||
setPassword(event.target.value) | ||
} | ||
|
||
function onEmailChange(event: ChangeEvent<HTMLInputElement>){ | ||
setEmail(event.target.value) | ||
} | ||
function onSendForm(event: FormEvent){ | ||
event.preventDefault() | ||
console.log("email: " , email) | ||
console.log("username: " , username) | ||
console.log("password: ", password) | ||
} | ||
return ( | ||
<> | ||
<h1>register</h1> | ||
</> | ||
<div style={{ | ||
justifyContent: "center", | ||
alignItems: "center", | ||
color: "white", | ||
width: "100%", | ||
height: "93vh", | ||
display: "flex" | ||
}}> | ||
<form className={"login_container"}> | ||
<h2>enregistrer un compte</h2> | ||
<InputLoginButton src={usernameSvg} alt="email" title={"email"} Change={onEmailChange} /> | ||
<InputLoginButton src={usernameSvg} alt="username" title={"nom d'utilisateur"} Change={onUsernameChange}/> | ||
<InputLoginButton src={usernameSvg} alt="password" title={"mot de passe"} type="password" Change={onPasswordChange}/> | ||
<div className={"login_buttons_container"} style={{marginTop: "1vh"}}> | ||
<button className={"base"} style={{width: "75%"}}>Se connecter</button> | ||
</div> | ||
</form> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters