feat: init login page

This commit is contained in:
swve 2022-09-21 23:09:47 +02:00
parent fcd281d1d6
commit 920339b5fd
11 changed files with 107 additions and 25 deletions

39
front/pages/login.tsx Normal file
View file

@ -0,0 +1,39 @@
import React from "react";
import Layout from "../components/ui/layout";
import { Title } from "../components/ui/styles/title";
const Login = () => {
const [email, setEmail] = React.useState("");
const [password, setPassword] = React.useState("");
const handleSubmit = (e: any) => {
e.preventDefault();
console.log(email, password);
};
const handleEmailChange = (e: any) => {
setEmail(e.target.value);
};
const handlePasswordChange = (e: any) => {
setPassword(e.target.value);
};
return (
<div>
<Layout>
<Title>Login</Title>
<form>
<input onChange={handleEmailChange} type="text" placeholder="email" />
<input onChange={handlePasswordChange} type="password" placeholder="password" />
<button onClick={handleSubmit} type="submit">
Login
</button>
</form>
</Layout>
</div>
);
};
export default Login;