Skip to content

Commit

Permalink
fix: remove search dropdown on account views (#2043)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Oct 27, 2023
1 parent f46a4a7 commit b74d0a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webapp/src/components/AssetTopbar/AssetTopbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b74d0a3

Please sign in to comment.