From ead998d0ad4a77e74b9107114e54e195511a3559 Mon Sep 17 00:00:00 2001 From: Brendan F Date: Wed, 12 Jul 2023 22:02:07 -0700 Subject: Only show debug menu while running locally --- src/components/Footer/index.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 1743133..e2747c3 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -5,6 +5,7 @@ import { Button } from ".."; import * as Styled from "./index.styled"; export function Footer() { + const showDebugButton = location.hostname == "localhost" || location.port == "3000"; const [showDebugMenu, setShowDebugMenu] = React.useState(false); const toggleDebugMenu = React.useCallback(() => { @@ -28,14 +29,16 @@ export function Footer() { Maciej Synowski - -
- {showDebugMenu && - - } -
+ {showDebugButton && + +
+ {showDebugMenu && + + } +
+ } ); } -- cgit v1.2.3