From 6832a59799234b219a70fe73c31558303235118e Mon Sep 17 00:00:00 2001 From: yasen5 <167659798+yasen5@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:48:55 -0800 Subject: [PATCH] Fix involved countries always showing, remove SVG generator except in dev mode --- src/Navbar.tsx | 44 +++++++++++++++++++++++++++----------------- src/popup.tsx | 25 ++++++++++++++++--------- 2 files changed, 43 insertions(+), 26 deletions(-) diff --git a/src/Navbar.tsx b/src/Navbar.tsx index c9691b9..0a30e63 100644 --- a/src/Navbar.tsx +++ b/src/Navbar.tsx @@ -2,6 +2,13 @@ import { useState } from "react"; import { usePageTransitionContext } from "./page-transition-provider.tsx"; import { AppPage, AppPageLabels } from "./AppPageLabels.ts"; +const isDev = + window.location.hostname === "localhost" || + window.location.hostname === "127.0.0.1" || + window.location.hostname.includes("dev") || + window.location.hostname.includes("staging"); + +const availablePages = isDev ? Object.entries(AppPageLabels) : Object.entries(AppPageLabels).filter(([key]) => Number(key) !== AppPage.SVG_GENERATOR); const Navbar = () => { const { goToPage } = usePageTransitionContext(); @@ -10,29 +17,32 @@ const Navbar = () => { return (