reformatted all relevant files to new style

This commit is contained in:
Tim Chamberlain
2022-07-14 14:32:11 -05:00
parent 86adca86dc
commit be42a98d4d
20 changed files with 493 additions and 93 deletions

View File

@ -0,0 +1,17 @@
import {useAuth0} from "@auth0/auth0-react";
import React from "react";
import {Button} from "@mui/material";
function AuthenticationButton()
{
const {loginWithRedirect, logout, isAuthenticated} = useAuth0();
if (isAuthenticated)
{
return <Button onClick={() => logout({returnTo: window.location.origin})}>Log Out</Button>;
}
return <Button onClick={() => loginWithRedirect()}>Log In</Button>;
}
export default AuthenticationButton;