From d6db2fd2d863fec17a555397ec00a5315ec0dbd9 Mon Sep 17 00:00:00 2001 From: Wolmin <44748271+Wolmin@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:58:46 +0100 Subject: [PATCH] Fix: Algolia optimization (#13) --- ui/shared/entities/address/AddressEntity.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/shared/entities/address/AddressEntity.tsx b/ui/shared/entities/address/AddressEntity.tsx index 72339309b6..50de668fca 100644 --- a/ui/shared/entities/address/AddressEntity.tsx +++ b/ui/shared/entities/address/AddressEntity.tsx @@ -134,6 +134,9 @@ const Content = chakra((props: ContentProps) => { useEffect(() => { // this causes a sort of loading state where the address suddenly switches to up name - needs fix? (async() => { + if (!props.address.is_contract) { + return; + } const upData = await getUniversalProfile(props.address.hash, queryClient); if (upData === undefined) { return; @@ -142,7 +145,7 @@ const Content = chakra((props: ContentProps) => { setUpName(upData.LSP3Profile.name); } })(); - }, [ props.address.hash, queryClient ]); + }, [ props, queryClient ]); const displayedName = upName !== '' ? formattedLuksoName(props.address.hash, upName) : props.address.hash; return (