got new theme system to work without re-rendering

This commit is contained in:
Carter 2025-04-14 16:25:33 -06:00
parent a452cf9444
commit 3454d16f36
12 changed files with 100 additions and 361 deletions

View file

@ -37,19 +37,13 @@ const BinCableEstimator = lazy(() => import("pages/BinCableEstimator"));
const APIDocs = lazy(() => import("pages/APIDocs"));
const Fields = lazy(()=> import("pages/Fields"));
const Marketplace = lazy(() => import("userFeatures/UserFeatures"))
interface Props {
toggleTheme: () => void;
}
export const appendToUrl = (appendage: number | string) => {
const basePath = location.pathname.replace(/\/$/, "");
return(`${basePath}/${appendage}`);
};
export default function Router(props: Props) {
export default function Router() {
const { toggleTheme } = props;
const { isAuthenticated, loginWithRedirect, isLoading } = useAuth0();
const whiteLabel = getWhitelabel();
const [{ user }] = useGlobalState();
@ -290,11 +284,7 @@ export default function Router(props: Props) {
return (
<Suspense fallback={<LoadingScreen />}>
<BrowserRouter>
<Header
toggleTheme={toggleTheme}
// teams={teams}
// setTeams={setTeams}
/>
<Header />
<Routes>
{/* Redirects */}