From 151dfefe417417ca1a66a807925b532e4fa0b51f Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 7 Nov 2024 13:45:47 +0100 Subject: [PATCH] fix notes tag on token page --- ui/token/TokenPageTitle.tsx | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/ui/token/TokenPageTitle.tsx b/ui/token/TokenPageTitle.tsx index 2cc648cb53..c4a1f61c39 100644 --- a/ui/token/TokenPageTitle.tsx +++ b/ui/token/TokenPageTitle.tsx @@ -12,6 +12,7 @@ import type { ResourceError } from 'lib/api/resources'; import useApiQuery from 'lib/api/useApiQuery'; import { useAppContext } from 'lib/contexts/app'; import { getTokenTypeName } from 'lib/token/tokenTypes'; +import AddressMetadataAlert from 'ui/address/details/AddressMetadataAlert'; import AddressQrCode from 'ui/address/details/AddressQrCode'; import AccountActionsMenu from 'ui/shared/AccountActionsMenu/AccountActionsMenu'; import AddressAddToWallet from 'ui/shared/address/AddressAddToWallet'; @@ -82,7 +83,7 @@ const TokenPageTitle = ({ tokenQuery, addressQuery, hash }: Props) => { verifiedInfoQuery.data?.projectSector ? { slug: verifiedInfoQuery.data.projectSector, name: verifiedInfoQuery.data.projectSector, tagType: 'custom' as const, ordinal: -30 } : undefined, - ...(addressMetadataQuery.data?.addresses?.[hash.toLowerCase()]?.tags || []), + ...(addressMetadataQuery.data?.addresses?.[hash.toLowerCase()]?.tags.filter(tag => tag.tagType !== 'note') || []), ].filter(Boolean).sort(sortEntityTags); }, [ addressMetadataQuery.data?.addresses, @@ -133,20 +134,24 @@ const TokenPageTitle = ({ tokenQuery, addressQuery, hash }: Props) => { ); return ( - - ) : null } - contentAfter={ contentAfter } - secondRow={ secondRow } - /> + <> + + ) : null } + contentAfter={ contentAfter } + secondRow={ secondRow } + /> + { !addressMetadataQuery.isPending && + } + ); };