From a18db461514a5aac7a0bbdb6d7ad30ae1ddcbea4 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 7 May 2022 12:33:04 -0700 Subject: [PATCH] doc: add useState, onChange, and signIn methods to login --- src/Auth/Login.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Auth/Login.js b/src/Auth/Login.js index d2fec02..2a2844b 100644 --- a/src/Auth/Login.js +++ b/src/Auth/Login.js @@ -1,8 +1,12 @@ -import React from "react"; +import React, { useState } from "react"; import { Link } from "react-router-dom"; import "./Login.css"; function Login() { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + const signIn = () => {}; return (
@@ -17,11 +21,21 @@ function Login() {

Sign In

Email
- + setEmail(e.target.value)} + />
Password
- + setPassword(e.target.value)} + /> - +