Created
May 29, 2020 15:22
-
-
Save RealSlimMahdi/28d9c313bcac9baed334400fd388012a to your computer and use it in GitHub Desktop.
amplify Authenticator customization
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, { useState, useEffect } from "react" | |
import { | |
AmplifyAuthenticator, | |
AmplifySignIn, | |
AmplifyGoogleButton, | |
} from "@aws-amplify/ui-react" | |
import "@aws-amplify/ui/dist/style.css" | |
import useAuthState from "../hooks/useAuthState" | |
const Dashboard = () => { | |
const { user } = useAuthState() | |
return ( | |
<AmplifyAuthenticator> | |
<AmplifyGoogleButton slot="sign-in"></AmplifyGoogleButton> | |
<div>Dashboard!</div> | |
<div>{JSON.stringify(user, null, 2)}</div> | |
</AmplifyAuthenticator> | |
) | |
} | |
export default Dashboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment