QQQ-32: added booleans, cleaned up error handling, fixed infinite loop on unauthorized login, removed all the login buttons, removed redundant qClient functions

This commit is contained in:
Tim Chamberlain
2022-08-09 11:52:32 -05:00
parent c4b72c4b11
commit 7cb3c5ee88
12 changed files with 81 additions and 104 deletions

View File

@ -1,17 +0,0 @@
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;