diff --git a/src/components/welcome/MyAccounts/PaginatedSafeList.tsx b/src/components/welcome/MyAccounts/PaginatedSafeList.tsx index b6bafbf5e5..fdb0bceb2d 100644 --- a/src/components/welcome/MyAccounts/PaginatedSafeList.tsx +++ b/src/components/welcome/MyAccounts/PaginatedSafeList.tsx @@ -10,7 +10,6 @@ import css from './styles.module.css' type PaginatedSafeListProps = { safes: SafeItems title: ReactNode - safeCount?: number action?: ReactElement onLinkClick?: () => void } @@ -19,7 +18,7 @@ const DEFAULT_SHOWN = 5 const MAX_DEFAULT_SHOWN = 7 const PAGE_SIZE = 5 -const PaginatedSafeList = ({ safes, title, action, safeCount, onLinkClick }: PaginatedSafeListProps) => { +const PaginatedSafeList = ({ safes, title, action, onLinkClick }: PaginatedSafeListProps) => { const [maxShownSafes, setMaxShownSafes] = useState(DEFAULT_SHOWN) const shownSafes = useMemo(() => { @@ -36,13 +35,11 @@ const PaginatedSafeList = ({ safes, title, action, safeCount, onLinkClick }: Pag
{title} - {safeCount && safeCount > 0 ? ( + {safes.length > 0 && ( {' '} - ({safeCount}) + ({safes.length}) - ) : ( - '' )} {action} diff --git a/src/components/welcome/MyAccounts/index.tsx b/src/components/welcome/MyAccounts/index.tsx index 6bd4241435..e1d4991ba7 100644 --- a/src/components/welcome/MyAccounts/index.tsx +++ b/src/components/welcome/MyAccounts/index.tsx @@ -17,8 +17,8 @@ type AccountsListProps = { onLinkClick?: () => void } const AccountsList = ({ safes, onLinkClick }: AccountsListProps) => { - const ownedSafes = useMemo(() => safes.filter(({ isOnWatchlist }) => !isOnWatchlist), [safes]) - const watchlistSafes = useMemo(() => safes.filter(({ isOnWatchlist }) => isOnWatchlist), [safes]) + const ownedSafes = useMemo(() => safes.filter(({ isWatchlist }) => !isWatchlist), [safes]) + const watchlistSafes = useMemo(() => safes.filter(({ isWatchlist }) => isWatchlist), [safes]) return ( @@ -30,12 +30,7 @@ const AccountsList = ({ safes, onLinkClick }: AccountsListProps) => { - + @@ -48,7 +48,7 @@ const useAllSafes = (): SafeItems => { return uniqueAddresses.map((address) => ({ address, chainId, - isOnWatchlist: !(ownedOnChain || []).includes(address), + isWatchlist: !(ownedOnChain || []).includes(address), threshold: allAdded[chainId]?.[address]?.threshold, owners: allAdded[chainId]?.[address]?.owners.length, }))