From 581a1bfa7a97389559e36ad31c73e431c4f58601 Mon Sep 17 00:00:00 2001 From: rohitmalhotra1420 Date: Thu, 1 Aug 2024 16:12:43 +0530 Subject: [PATCH] fixed the prod dapp option visibility in header --- src/primaries/Profile.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/primaries/Profile.tsx b/src/primaries/Profile.tsx index 674eacb08e..00ef6c43f3 100644 --- a/src/primaries/Profile.tsx +++ b/src/primaries/Profile.tsx @@ -8,7 +8,7 @@ import styled, { useTheme } from 'styled-components'; // Internal Compoonents import ProfileModal from 'components/ProfileModal'; import LoaderSpinner, { LOADER_TYPE } from 'components/reusables/loaders/LoaderSpinner'; -import { envUtil, shortenText } from 'helpers/UtilityHelper'; +import { EnvHelper, envUtil, shortenText } from 'helpers/UtilityHelper'; import { useAccount } from 'hooks'; import { useClickAway } from 'hooks/useClickAway'; import { useResolveWeb3Name } from 'hooks/useResolveWeb3Name'; @@ -63,14 +63,18 @@ const Profile = ({ isDarkMode }: { isDarkMode: boolean }) => { to: APP_PATHS.UserSettings, invertedIcon: getPublicAssetPath('svg/setting.svg'), }, - { - id: 'prodDapp', - value: '', - function: () => {}, - link: `https://${envUtil.prod}`, - title: 'Production dapp', - invertedIcon: getPublicAssetPath('prod.svg'), - }, + ...(EnvHelper.isProd + ? [] + : [ + { + id: 'prodDapp', + value: '', + function: () => {}, + link: `https://${envUtil.prod}`, + title: 'Production dapp', + invertedIcon: getPublicAssetPath('prod.svg'), + }, + ]), { id: 'disconnect', value: '',