Skip to content

Instantly share code, notes, and snippets.

@abhiaiyer91
Created March 27, 2021 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhiaiyer91/5c4ed255cb8a9553fc5798a00d14616b to your computer and use it in GitHub Desktop.
Save abhiaiyer91/5c4ed255cb8a9553fc5798a00d14616b to your computer and use it in GitHub Desktop.
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