From f8390d7eacc082a7b0a4551a3bc1572e3ce3463e Mon Sep 17 00:00:00 2001 From: Vojtech Simetka Date: Wed, 27 Jul 2022 08:45:11 +0200 Subject: [PATCH] fix: disable swarm invitation outside of Swarm Desktop (#497) --- src/pages/account/wallet/AccountWallet.tsx | 9 ++++++--- src/routes.tsx | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/account/wallet/AccountWallet.tsx b/src/pages/account/wallet/AccountWallet.tsx index b6ee6166..ffe79c0b 100644 --- a/src/pages/account/wallet/AccountWallet.tsx +++ b/src/pages/account/wallet/AccountWallet.tsx @@ -10,6 +10,7 @@ import ExpandableListItemActions from '../../../components/ExpandableListItemAct import ExpandableListItemKey from '../../../components/ExpandableListItemKey' import { Loading } from '../../../components/Loading' import { SwarmButton } from '../../../components/SwarmButton' +import config from '../../../config' import { Context } from '../../../providers/Bee' import { ROUTES } from '../../../routes' import { AccountNavigation } from '../AccountNavigation' @@ -65,9 +66,11 @@ export function AccountWallet(): ReactElement { Check transactions on Blockscout - - Invite to Swarm... - + {config.BEE_DESKTOP_ENABLED && ( + + Invite to Swarm... + + )} ) diff --git a/src/routes.tsx b/src/routes.tsx index d03e3c19..b474ce03 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -23,6 +23,7 @@ import { CryptoTopUpIndex } from './pages/top-up/CryptoTopUpIndex' import { GiftCardFund } from './pages/top-up/GiftCardFund' import { GiftCardTopUpIndex } from './pages/top-up/GiftCardTopUpIndex' import { Swap } from './pages/top-up/Swap' +import config from './config' export enum ROUTES { INFO = '/', @@ -84,7 +85,7 @@ const BaseRouter = (): ReactElement => ( } /> } /> } /> - } /> + {config.BEE_DESKTOP_ENABLED && } />} )