diff --git a/.gitignore b/.gitignore index 7ae8834..8147c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ /out/ + +/build/ + # misc .DS_Store *.pem diff --git a/src/app/auth/login/page.tsx b/src/app/auth/login/page.tsx index ff949a1..455069a 100644 --- a/src/app/auth/login/page.tsx +++ b/src/app/auth/login/page.tsx @@ -1,31 +1,46 @@ +"use client" import usernameSvg from "@/assets/username.svg" import InputLoginButton from "@/components/inputs/InputLoginButtons" -import { Input } from "postcss" - - +import Link from "next/link" +import { ChangeEvent, FormEvent, FormEventHandler, useState } from "react" export default function Login() { + const [username, setUsername] = useState("") + const [password, setPassword] = useState("") + + function onUsernameChange(event: ChangeEvent){ + setUsername(event.target.value) + } + function onPasswordChange(event: ChangeEvent){ + setPassword(event.target.value) + } + function onSendForm(event: FormEvent){ + event.preventDefault() + alert("form en développement") + } return (
-
+

Connection au compte

- - + +
-

Se souvenir de moi

+ +

Se souvenir de moi

reset mot de passe

+ Pas de compte ? merci de vous enregistrer
- +
diff --git a/src/app/auth/register/page.tsx b/src/app/auth/register/page.tsx index c72ec02..33777d3 100644 --- a/src/app/auth/register/page.tsx +++ b/src/app/auth/register/page.tsx @@ -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("") + const [username, setUsername] = useState("") + const [password, setPassword] = useState("") + + function onUsernameChange(event: ChangeEvent){ + setUsername(event.target.value) + } + function onPasswordChange(event: ChangeEvent){ + setPassword(event.target.value) + } + + function onEmailChange(event: ChangeEvent){ + setEmail(event.target.value) + } + function onSendForm(event: FormEvent){ + event.preventDefault() + console.log("email: " , email) + console.log("username: " , username) + console.log("password: ", password) + } return ( - <> -

register

- +
+
+

enregistrer un compte

+ + + +
+ +
+ +
) } \ No newline at end of file diff --git a/src/components/inputs/InputLoginButtons.tsx b/src/components/inputs/InputLoginButtons.tsx index 6d39688..1a1ae2e 100644 --- a/src/components/inputs/InputLoginButtons.tsx +++ b/src/components/inputs/InputLoginButtons.tsx @@ -1,13 +1,16 @@ import { StaticImport } from "next/dist/shared/lib/get-img-props"; import Image, { ImageProps } from "next/image"; -import { FC, InputHTMLAttributes } from "react"; +import { ChangeEventHandler, FC, InputHTMLAttributes } from "react"; interface InputLoginButtonProps{ src: String | Object | any, title: string, alt: string, + type?: string, + Change?: ChangeEventHandler } -const InputLoginButton: FC = ({src, title, alt, ...props}) => { +const InputLoginButton: FC = ({src, title, alt, type = "Text", Change, ...props}) => { + return (
= ({src, title, alt, ...props justifyContent: "center", height: "5vh", padding: "10px", - marginTop: "-60px" + marginTop: "-40px", + color: "black" }}> {alt} = ({src, title, alt, ...props borderColor: "black", borderWidth: "1px" }}/> - = ({src, title, alt, ...props borderRadius: "10px", paddingLeft: "60px", position: "absolute", - }}/> + }} + onChange={Change} + />
) } diff --git a/src/components/navBar.tsx b/src/components/navBar.tsx index 9f4d50a..84df803 100644 --- a/src/components/navBar.tsx +++ b/src/components/navBar.tsx @@ -1,6 +1,7 @@ import React from "react"; import Image from 'next/image' import logo from '@/assets/logo.png' +import Link from "next/link"; export default function NavBar(): React.ReactNode { return ( <> @@ -11,7 +12,7 @@ export default function NavBar(): React.ReactNode {
- +