From 530d09fca16bdf73fdf47ccbab8f1dacfb760104 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 19 Jul 2024 16:24:15 -0400 Subject: [PATCH] feat: added feature flag --- frontend/widgets/src/QueryApi.Dashboard.jsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/widgets/src/QueryApi.Dashboard.jsx b/frontend/widgets/src/QueryApi.Dashboard.jsx index 3e5b22c5..8d2c4535 100644 --- a/frontend/widgets/src/QueryApi.Dashboard.jsx +++ b/frontend/widgets/src/QueryApi.Dashboard.jsx @@ -466,6 +466,7 @@ const validateContractId = (accountId) => { return true; }; +const IS_DEV = `${REPL_EXTERNAL_APP_URL}` === "https://queryapi-frontend-vcqilefdcq-ew.a.run.app" || `${REPL_EXTERNAL_APP_URL}` === "http://localhost:3000"; const [activeTab, setActiveTab] = useState(props.view === "create-new-indexer" ? "create-new-indexer" : props.selectedIndexerPath ? "indexer" : "explore"); const [activeIndexerTabView, setActiveIndexerTabView] = useState(props.activeIndexerView ?? "editor"); @@ -622,13 +623,15 @@ const selectIndexerPage = (viewName) => { return ( - selectTab("launchpad")} - selected={activeTab === "launchpad"} - > - Launchpad - + {!IS_DEV && ( + selectTab("launchpad")} + selected={activeTab === "launchpad"} + > + Launchpad + + )} - {activeTab === 'launchpad' && ( + {activeTab === 'launchpad' && IS_DEV && (
Please note that this page is currently under development. Features may be incomplete or inaccurate