Skip to content

Instantly share code, notes, and snippets.

@RealSlimMahdi
Created May 29, 2020 15:22
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 RealSlimMahdi/28d9c313bcac9baed334400fd388012a to your computer and use it in GitHub Desktop.
Save RealSlimMahdi/28d9c313bcac9baed334400fd388012a to your computer and use it in GitHub Desktop.
amplify Authenticator customization
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