import React, { useState } from "react"; import "./Login.css"; import { Link, useHistory } from "react-router-dom"; import { auth } from "./firebase"; function Login() { const history = useHistory(); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const signIn = (e) => { e.preventDefault(); // firebase auth .signInWithEmailAndPassword(email, password) .then((auth) => { if (auth) { history.push("/"); } }) .catch((err) => alert(err.message)); }; const register = (e) => { e.preventDefault(); auth .createUserWithEmailAndPassword(email, password) .then((auth) => { if (auth) { history.push("/"); } }) .catch((err) => alert(err.message)); // fancy firebase register }; return (

Sign-In

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

By signing in you agree the Terms and Conditions of the Amazon fake clone. Please see our privacy notice and out cookies policy

); } export default Login;