Last active
June 18, 2022 08:34
-
-
Save yathindrak/f3276482e35feeb73b911c9b381972c6 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
const { state, signIn, signOut } = useAuthContext(); | |
..... | |
{ | |
state?.isAuthenticated ? | |
( | |
<button | |
className="inline-flex items-center justify-center h-12 px-6 font-medium tracking-wide text-white transition duration-200 rounded shadow-md bg-deep-purple-accent-400 hover:bg-deep-purple-accent-700 focus:shadow-outline focus:outline-none" | |
aria-label="Sign up" | |
title="Sign up" | |
onClick={() => signOut()} | |
> | |
Sign Out | |
</button> | |
) : | |
( | |
<button | |
className="inline-flex items-center justify-center h-12 px-6 font-medium tracking-wide text-white transition duration-200 rounded shadow-md bg-deep-purple-accent-400 hover:bg-deep-purple-accent-700 focus:shadow-outline focus:outline-none" | |
aria-label="Sign up" | |
title="Sign up" | |
onClick={() => signIn()} | |
> | |
Sign In | |
</button> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment