From f94184d23c82bca0ed694fa9e8781818891f0af1 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 cd12996de9..32e6e1fd13 100644 --- a/ui/shared/entities/address/AddressEntity.tsx +++ b/ui/shared/entities/address/AddressEntity.tsx @@ -125,6 +125,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; @@ -133,7 +136,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 (