Skip to content

Commit 98d31b9

Browse files
committed
remove env gitignore
1 parent 58abde4 commit 98d31b9

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ node_modules/
55
/playwright-report/
66
/blob-report/
77
/playwright/.cache/
8+
9+
# Environment files / secrets
10+
.env
11+
.env.*
12+
!.env.example
13+
!.env.*.example

frontend/src/routes/__root.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
44
import ErrorComponent from "@/components/Common/ErrorComponent"
55
import NotFound from "@/components/Common/NotFound"
66

7+
const showTanStackDevtools =
8+
import.meta.env.DEV && import.meta.env.VITE_SHOW_DEVTOOLS === "true"
9+
710
export const Route = createRootRoute({
811
component: () => (
912
<>
1013
<HeadContent />
1114
<Outlet />
12-
<TanStackRouterDevtools position="bottom-right" />
13-
<ReactQueryDevtools initialIsOpen={false} />
15+
{showTanStackDevtools ? (
16+
<>
17+
<TanStackRouterDevtools position="bottom-right" />
18+
<ReactQueryDevtools initialIsOpen={false} />
19+
</>
20+
) : null}
1421
</>
1522
),
1623
notFoundComponent: () => <NotFound />,

frontend/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
interface ImportMetaEnv {
44
readonly VITE_API_URL: string
55
readonly VITE_GOOGLE_CLIENT_ID?: string
6+
readonly VITE_SHOW_DEVTOOLS?: string
67
}
78

89
interface ImportMeta {

0 commit comments

Comments
 (0)