From cb051b195575c8f8950419d2bcc323237130cf48 Mon Sep 17 00:00:00 2001 From: Mati Dastugue Date: Tue, 27 Oct 2020 11:53:03 -0300 Subject: [PATCH] Collectibles List - Manage list when no collectibles (#1419) * Bump new onboard.js version * Remove component * Fix travis rollback bug * Fix Typos + Updated logic Co-authored-by: Daniel Sanchez Co-authored-by: nicolas --- .../Balances/Tokens/screens/AssetsList/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/routes/safe/components/Balances/Tokens/screens/AssetsList/index.tsx b/src/routes/safe/components/Balances/Tokens/screens/AssetsList/index.tsx index fbe2f64b..6f4f4e93 100644 --- a/src/routes/safe/components/Balances/Tokens/screens/AssetsList/index.tsx +++ b/src/routes/safe/components/Balances/Tokens/screens/AssetsList/index.tsx @@ -1,4 +1,5 @@ import MuiList from '@material-ui/core/List' +import CircularProgress from '@material-ui/core/CircularProgress' import Search from '@material-ui/icons/Search' import cn from 'classnames' import SearchBar from 'material-ui-search-bar' @@ -27,6 +28,10 @@ import { export const ADD_CUSTOM_ASSET_BUTTON_TEST_ID = 'add-custom-asset-btn' +type Props = { + setActiveScreen: (newScreen: string) => void +} + const filterBy = (filter, nfts) => nfts.filter( (asset) => @@ -36,7 +41,7 @@ const filterBy = (filter, nfts) => asset.symbol.toLowerCase().includes(filter.toLowerCase()), ) -const AssetsList = (props) => { +const AssetsList = (props: Props): React.ReactElement => { const classes = useStyles() const searchClasses = { input: classes.searchInput, @@ -126,12 +131,12 @@ const AssetsList = (props) => { - {!nftAssetsList.length && ( + {!nftAssetsList?.length && ( - No collectibles available + {!nftAssetsList ? : No collectibles available} )} - {nftAssetsList.length > 0 && ( + {nftAssetsFilteredList.length > 0 && (