Skip to content

Commit

Permalink
Add loading state to account collection card
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Dec 1, 2023
1 parent bb2d294 commit e764373
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/pages/AccountDetailsPage/AccountNFTCollectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const AccountNFTCollectionCard: FC<AccountDetailsContext> = ({ scope, add
<AccountNFTCollection
inventory={inventory}
isFetched={isFetched}
isLoading={isLoading}
totalCount={totalCount}
isTotalCountClipped={isTotalCountClipped}
pagination={pagination}
Expand All @@ -97,6 +98,7 @@ export const AccountNFTCollectionCard: FC<AccountDetailsContext> = ({ scope, add

type AccountNFTCollectionProps = {
inventory: EvmNft[] | undefined
isLoading: boolean
isFetched: boolean
isTotalCountClipped: boolean | undefined
totalCount: number | undefined
Expand All @@ -110,6 +112,7 @@ type AccountNFTCollectionProps = {

const AccountNFTCollection: FC<AccountNFTCollectionProps> = ({
inventory,
isLoading,
isFetched,
isTotalCountClipped,
pagination,
Expand All @@ -120,6 +123,7 @@ const AccountNFTCollection: FC<AccountNFTCollectionProps> = ({

return (
<>
{isLoading && <Skeleton variant="rectangular" sx={{ height: 200 }} />}
{isFetched && !totalCount && <CardEmptyState label={t('tokens.emptyInventory')} />}
{!!inventory?.length && (
<>
Expand Down

0 comments on commit e764373

Please sign in to comment.