diff --git a/README.md b/README.md index a05ee5a..a32d432 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # linkpulse +[![wakatime](https://wakatime.com/badge/github/Xevion/linkpulse.svg)](https://wakatime.com/badge/github/Xevion/linkpulse) + A project for monitoring websites, built with FastAPI and React. ## Structure diff --git a/frontend/src/routes/__root.tsx b/frontend/src/routes/__root.tsx index c12b2eb..d03e961 100644 --- a/frontend/src/routes/__root.tsx +++ b/frontend/src/routes/__root.tsx @@ -1,11 +1,25 @@ import { createRootRoute, Outlet } from "@tanstack/react-router"; -import { TanStackRouterDevtools } from "@tanstack/router-devtools"; +import { lazy, Suspense } from "react"; + +const TanStackRouterDevtools = + process.env.NODE_ENV === "production" + ? () => null // Render nothing in production + : lazy(() => + // Lazy load in development + import("@tanstack/router-devtools").then((res) => ({ + default: res.TanStackRouterDevtools, + // For Embedded Mode + // default: res.TanStackRouterDevtoolsPanel + })), + ); export const Route = createRootRoute({ component: () => ( <> - + + + ), });