mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init login page
This commit is contained in:
parent
fcd281d1d6
commit
920339b5fd
11 changed files with 107 additions and 25 deletions
39
front/pages/login.tsx
Normal file
39
front/pages/login.tsx
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue