File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { z } from "zod" ;
22import { createZodFetcher } from "zod-fetch" ;
33
4- const BASE_URL = "http://localhost:3030/api" ;
4+ const BASE_URL = import . meta . env . PROD ? "/api" : "http://localhost:3030/api" ;
55
66const overview = z . object ( {
77 file_name : z . string ( ) ,
Original file line number Diff line number Diff line change 11import "./index.css" ;
2+
3+ import React from "react" ;
24import { StrictMode } from "react" ;
35import ReactDOM from "react-dom/client" ;
4- import { ReactQueryDevtools } from "@tanstack/react-query-devtools" ;
56import { RouterProvider , createRouter } from "@tanstack/react-router" ;
67import { QueryClient , QueryClientProvider } from "@tanstack/react-query" ;
78
@@ -18,6 +19,14 @@ declare module "@tanstack/react-router" {
1819 }
1920}
2021
22+ const ReactQueryDevtools = import . meta. env . PROD
23+ ? ( ) => null // Render nothing in production
24+ : React . lazy ( ( ) =>
25+ import ( "@tanstack/react-query-devtools" ) . then ( ( res ) => ( {
26+ default : res . ReactQueryDevtools ,
27+ } ) ) ,
28+ ) ;
29+
2130const queryClient = new QueryClient ( ) ;
2231
2332// Render the app
Original file line number Diff line number Diff line change 1+ import React from "react" ;
12import { Menu , Database } from "lucide-react" ;
23import { createRootRoute , Link , Outlet } from "@tanstack/react-router" ;
3- import { TanStackRouterDevtools } from "@tanstack/router-devtools" ;
44
55import { Button } from "@/components/ui/button" ;
66import { Sheet , SheetContent , SheetTrigger } from "@/components/ui/sheet" ;
77
8+ const TanStackRouterDevtools = import . meta. env . PROD
9+ ? ( ) => null // Render nothing in production
10+ : React . lazy ( ( ) =>
11+ import ( "@tanstack/router-devtools" ) . then ( ( res ) => ( {
12+ default : res . TanStackRouterDevtools ,
13+ } ) ) ,
14+ ) ;
15+
816export const Route = createRootRoute ( {
917 component : Root ,
1018} ) ;
You can’t perform that action at this time.
0 commit comments