import React, { useState } from "react"; import { Input, InputLabel, Button, FormControl, Paper, Typography, Avatar, } from "@material-ui/core"; import { LockOutlined } from "@material-ui/icons"; import NavBar from "./shared/NavBar"; import {useHistory} from "react-router-dom"; function Login() { const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); const history = useHistory(); function login(e) { setUsername(""); setPassword(""); history.push("/home"); e.preventDefault(); } return ( <>
Sign In
Username setUsername(evt.target.value)} /> Password setPassword(evt.target.value)} />
); } export default Login;