mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 20:09:25 +00:00
39 lines
938 B
TypeScript
39 lines
938 B
TypeScript
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;
|