first commit
This commit is contained in:
34
ui/app/pprof/layout.tsx
Normal file
34
ui/app/pprof/layout.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import { ThemeProvider } from "@/components/themeProvider";
|
||||
import { ReduxProvider } from "@/lib/store";
|
||||
import { isDevelopmentMode } from "@/lib/utils/port";
|
||||
import { createFileRoute, notFound } from "@tanstack/react-router";
|
||||
import { Toaster } from "sonner";
|
||||
import PprofPage from "./page";
|
||||
|
||||
function PprofLayout({ children }: { children: React.ReactNode }) {
|
||||
// Only allow access in development mode
|
||||
if (!isDevelopmentMode()) {
|
||||
throw notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
|
||||
<Toaster />
|
||||
<ReduxProvider>
|
||||
<div className="min-h-screen bg-zinc-950 text-zinc-100">{children}</div>
|
||||
</ReduxProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function RouteComponent() {
|
||||
return (
|
||||
<PprofLayout>
|
||||
<PprofPage />
|
||||
</PprofLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export const Route = createFileRoute("/pprof")({
|
||||
component: RouteComponent,
|
||||
});
|
||||
1230
ui/app/pprof/page.tsx
Normal file
1230
ui/app/pprof/page.tsx
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user