Commit a7424c63 authored by tom's avatar tom

Not possible to remove address filter in token inventory for an address with no NFTs

Fixes #1514
parent 98d3bbcd
......@@ -33,7 +33,7 @@ const AddressCollections = ({ collectionsQuery, address, hasActiveFilters }: Pro
</ActionBar>
);
const content = data?.items ? data?.items.map((item, index) => {
const content = data?.items ? data?.items.filter((item) => item.token_instances.length > 0).map((item, index) => {
const collectionUrl = route({
pathname: '/token/[hash]',
query: {
......
import { Box, Heading, Text } from '@chakra-ui/react';
import { Box, Heading, Text, Icon } from '@chakra-ui/react';
import React from 'react';
import IconSvg from 'ui/shared/IconSvg';
// This icon doesn't work properly when it is in the sprite
// Probably because of radial gradient
// eslint-disable-next-line no-restricted-imports
import emptySearchResultIcon from 'icons/empty_search_result.svg';
interface Props {
text: string | JSX.Element;
......@@ -14,11 +17,7 @@ const EmptySearchResult = ({ text }: Props) => {
flexDirection="column"
alignItems="center"
>
<IconSvg
name="empty_search_result"
boxSize={ 60 }
display="block"
/>
<Icon as={ emptySearchResultIcon } boxSize={ 60 }/>
<Heading
as="h3"
......
......@@ -83,6 +83,10 @@ const TokenInventory = ({ inventoryQuery, tokenQuery, ownerFilter }: Props) => {
isError={ inventoryQuery.isError }
items={ items }
emptyText="There are no tokens."
filterProps={{
hasActiveFilters: Boolean(ownerFilter),
emptyFilteredText: 'No tokens found for the selected owner.',
}}
content={ content }
actionBar={ actionBar }
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment