local login now functional

This commit is contained in:
Carter 2026-05-06 18:18:57 -06:00
parent 3b62d87d31
commit ae9abaf9fd
9 changed files with 174 additions and 72 deletions

View file

@ -1,7 +1,7 @@
import { lazy, Suspense } from "react";
import LoadingScreen from "../app/LoadingScreen";
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import { useAuth0 } from "@auth0/auth0-react";
import { useAuthContext } from "providers/authContext";
import Header from "app/Header";
import Logout from "pages/Logout";
import { ErrorBoundary } from "react-error-boundary";
@ -57,7 +57,7 @@ export const appendToUrl = (appendage: number | string) => {
export default function Router() {
const { /*isAuthenticated, loginWithRedirect,*/ isLoading } = useAuth0();
const { isAuthenticated } = useAuthContext();
const whiteLabel = getWhitelabel();
const [{ user }] = useGlobalState();
@ -306,13 +306,7 @@ export default function Router() {
);
}
if (isLoading) return null;
// if (!isAuthenticated) {
// loginWithRedirect()
// return (
// null
// )
// }
if (!isAuthenticated) return null;
function ErrorFallback({ error }: { error: Error }) {
return <div>Something went wrong: {error.stack}</div>;