aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrendan F <EpicWolverine@users.noreply.github.com>2023-07-12 22:02:07 -0700
committerBrendan F <EpicWolverine@users.noreply.github.com>2023-07-12 22:02:07 -0700
commitead998d0ad4a77e74b9107114e54e195511a3559 (patch)
treeae09ca0461dc3acb9a4881d2fec45d066c64fb62 /src
parent6688918a53a451f8629bb6ee0a62dee0b118d724 (diff)
Only show debug menu while running locally
Diffstat (limited to 'src')
-rw-r--r--src/components/Footer/index.tsx19
1 files changed, 11 insertions, 8 deletions
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<boolean>(false);
const toggleDebugMenu = React.useCallback(() => {
@@ -28,14 +29,16 @@ export function Footer() {
Maciej Synowski
</Styled.Link>
</Styled.Text>
- <Styled.Text>
- <Button onClick={toggleDebugMenu}><IoBug /> Debug Options</Button><br />
- {showDebugMenu &&
- <Button variant="red" onClick={clearLocalStorage}>
- Clear Local Storage & Reload
- </Button>
- }
- </Styled.Text>
+ {showDebugButton &&
+ <Styled.Text>
+ <Button onClick={toggleDebugMenu}><IoBug /> Debug Options</Button><br />
+ {showDebugMenu &&
+ <Button variant="red" onClick={clearLocalStorage}>
+ Clear Local Storage & Reload
+ </Button>
+ }
+ </Styled.Text>
+ }
</footer>
);
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage