Created
March 27, 2021 16:24
-
-
Save abhiaiyer91/5c4ed255cb8a9553fc5798a00d14616b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { useAuth } from "../hooks/useAuth"; | |
// .... other code .... // | |
export default function Login() { | |
const { login } = useAuth(); | |
return ( | |
<section style={wrapper}> | |
<div style={loginCard}> | |
<h1 style={header}>Welcome to the App</h1> | |
<p style={paragraph}>You can try out logging in below!</p> | |
<button | |
style={button} | |
onClick={() => { | |
return login().catch((e) => { | |
console.error(e); | |
}); | |
}} | |
> | |
LOG IN | |
</button> | |
</div> | |
</section> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment