From 7c22fc993d50592d961fe6e7820df4f744390966 Mon Sep 17 00:00:00 2001 From: dev0623 Date: Wed, 22 Jun 2022 04:49:09 +0900 Subject: [PATCH 1/2] removed the nft gallery --- src/components/AddressBlock/index.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/AddressBlock/index.tsx b/src/components/AddressBlock/index.tsx index 946e528e..7af3dc46 100644 --- a/src/components/AddressBlock/index.tsx +++ b/src/components/AddressBlock/index.tsx @@ -224,12 +224,7 @@ function AddressBlock(props: Props) { }; function goToAccount(addressId, index, addressType, tokenName = '') { - const isMac = platform.indexOf('Mac') === 0; - if (isMac && addressType === AddressType.NFTGallery && isAppStore) { - setIsModalOpen(true, 'DisableNftModal'); - } else { - dispatch(changeAccountThunk(addressId, publicKeyHash, index, identityIndex, addressType, tokenName)); - } + dispatch(changeAccountThunk(addressId, publicKeyHash, index, identityIndex, addressType, tokenName)); } function setIsModalOpen(open, active) { @@ -326,10 +321,6 @@ function AddressBlock(props: Props) { /> )} - goToAccount(publicKeyHash, 0, AddressType.NFTGallery)}> - {t('general.nouns.nft_gallery')} - - goToAccount(publicKeyHash, 0, AddressType.PlatformLiquidity)}> {t('general.nouns.platform_liquidity')} From 5e6f8d602c8d80438e836b9717b9c618ffa61b64 Mon Sep 17 00:00:00 2001 From: dev0623 Date: Wed, 22 Jun 2022 08:47:59 +0900 Subject: [PATCH 2/2] using flag --- src/components/AddressBlock/index.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/AddressBlock/index.tsx b/src/components/AddressBlock/index.tsx index 7af3dc46..e9e626b7 100644 --- a/src/components/AddressBlock/index.tsx +++ b/src/components/AddressBlock/index.tsx @@ -224,7 +224,12 @@ function AddressBlock(props: Props) { }; function goToAccount(addressId, index, addressType, tokenName = '') { - dispatch(changeAccountThunk(addressId, publicKeyHash, index, identityIndex, addressType, tokenName)); + const isMac = platform.indexOf('Mac') === 0; + if (isMac && addressType === AddressType.NFTGallery && isAppStore) { + setIsModalOpen(true, 'DisableNftModal'); + } else { + dispatch(changeAccountThunk(addressId, publicKeyHash, index, identityIndex, addressType, tokenName)); + } } function setIsModalOpen(open, active) { @@ -320,6 +325,11 @@ function AddressBlock(props: Props) { onClick={() => goToAccount(publicKeyHash, 0, AddressType.Manager)} /> )} + {!(platform.indexOf('Mac') === 0 && isAppStore) && ( + goToAccount(publicKeyHash, 0, AddressType.NFTGallery)}> + {t('general.nouns.nft_gallery')} + + )} goToAccount(publicKeyHash, 0, AddressType.PlatformLiquidity)}> {t('general.nouns.platform_liquidity')}