Skip to content

Commit

Permalink
Merge pull request #174 from djnunez-aot/bug-fix
Browse files Browse the repository at this point in the history
Remove tanstack router devtools
  • Loading branch information
jadmsaadaot authored Nov 20, 2024
2 parents 5ceab6c + 834da18 commit 2cb6302
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions submit-web/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import DrawerProvider from "@/components/Shared/Drawers/DrawerProvider";
import { QueryClient } from "@tanstack/react-query";
import { notify } from "@/components/Shared/Snackbar/snackbarStore";
import { AppConfig } from "@/utils/config";
import { When } from "react-if";

type RouterContext = {
authentication: AuthContextProps;
Expand All @@ -25,6 +27,8 @@ export const Route = createRootRouteWithContext<RouterContext>()({
});

function Layout() {
const isLocal = AppConfig.environment === "local";

return (
<CatchBoundary
getResetKey={() => "reset"}
Expand All @@ -36,8 +40,10 @@ function Layout() {
<Outlet />
</Box>
<Footer />
<TanStackRouterDevtools position="bottom-left" />
<ReactQueryDevtools initialIsOpen={false} />
<When condition={isLocal}>
<TanStackRouterDevtools position="bottom-left" />
<ReactQueryDevtools initialIsOpen={false} />
</When>
</CatchBoundary>
);
}

0 comments on commit 2cb6302

Please sign in to comment.