From b74d0a3c271dd4dc9d664b7ac0304aa4082702be Mon Sep 17 00:00:00 2001 From: Melisa Anabella Rossi Date: Fri, 27 Oct 2023 13:21:31 -0300 Subject: [PATCH] fix: remove search dropdown on account views (#2043) --- webapp/src/components/AssetTopbar/AssetTopbar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/AssetTopbar/AssetTopbar.tsx b/webapp/src/components/AssetTopbar/AssetTopbar.tsx index 1f87719229..677730f295 100644 --- a/webapp/src/components/AssetTopbar/AssetTopbar.tsx +++ b/webapp/src/components/AssetTopbar/AssetTopbar.tsx @@ -24,6 +24,7 @@ import { isListsSection, persistIsMapProperty } from '../../modules/ui/utils' +import { View } from '../../modules/ui/types' import trash from '../../images/trash.png' import { Chip } from '../Chip' import { Props } from './AssetTopbar.types' @@ -160,9 +161,11 @@ export const AssetTopbar = ({ const handleFieldClick = useCallback(() => { // opens the dropdown on the field focus setShouldRenderSearchDropdown( - category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE + (category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE) && + view !== View.CURRENT_ACCOUNT && + view !== View.ACCOUNT ) - }, [category]) + }, [category, view]) const handleSearchBarDropdownClickOutside = useCallback(event => { // when clicking outside the dropdown, close it