From 2bced2cbaaa6ea1e886006aad9cb4c884632fe11 Mon Sep 17 00:00:00 2001 From: Emmanuel Pilande Date: Mon, 29 Jul 2019 00:21:05 -0700 Subject: [PATCH] :memo: Update README --- gatsby-theme-auth0/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gatsby-theme-auth0/README.md b/gatsby-theme-auth0/README.md index 7ddfec9..b550568 100644 --- a/gatsby-theme-auth0/README.md +++ b/gatsby-theme-auth0/README.md @@ -47,6 +47,27 @@ module.exports = { }; ``` +Set up your login/logout buttons and you're good to go! + +```jsx +import React from "react"; +import { AuthService, useAuth } from "gatsby-theme-auth0"; + +export default () => { + const { isLoggedIn, profile } = useAuth(); + return ( +
+ {profile &&

Hello {profile.name}

} + {isLoggedIn ? ( + + ) : ( + + )} +
+ ); +}; +``` + ### Theme options | Key | Default | Required | Description |