Skip to content

Commit

Permalink
feat: added feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin101Zhang committed Jul 19, 2024
1 parent cbb8e6d commit 530d09f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions frontend/widgets/src/QueryApi.Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -622,13 +623,15 @@ const selectIndexerPage = (viewName) => {
return (
<Wrapper>
<Tabs>
<TabsButton
type="button"
onClick={() => selectTab("launchpad")}
selected={activeTab === "launchpad"}
>
Launchpad
</TabsButton>
{!IS_DEV && (
<TabsButton
type="button"
onClick={() => selectTab("launchpad")}
selected={activeTab === "launchpad"}
>
Launchpad
</TabsButton>
)}

<TabsButton
type="button"
Expand All @@ -649,7 +652,7 @@ return (


<Main>
{activeTab === 'launchpad' && (
{activeTab === 'launchpad' && IS_DEV && (
<Section >
<AlertText>Please note that this page is currently under development. Features may be incomplete or inaccurate</AlertText>
<Hero>
Expand Down

0 comments on commit 530d09f

Please sign in to comment.