From c95a962c9ba3b712943b85e03c1b2af5a91fc01a Mon Sep 17 00:00:00 2001 From: Evan Kaloudis Date: Sat, 9 Nov 2024 23:45:55 -0500 Subject: [PATCH] ZEUS-2523: Bug fix: Coins: external wallets marked hidden appear in tab nav --- components/AccountFilter.tsx | 47 ++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/components/AccountFilter.tsx b/components/AccountFilter.tsx index a5610c5bc..f23bb43e7 100644 --- a/components/AccountFilter.tsx +++ b/components/AccountFilter.tsx @@ -6,6 +6,7 @@ import { themeColor } from './../utils/ThemeUtils'; interface PillProps { name: string; + hidden?: boolean; textColor?: string; borderColor?: string; backgroundColor?: string; @@ -72,28 +73,32 @@ function AccountFilter(props: AccountFilterProps) { for (const item in props.items) { const account = props.items[item]; - const { name } = account; + const { name, hidden } = account; - pills.push( - - { - if (props.onChangeAccount) props.onChangeAccount(); - setPin(name); - }} - /> - - ); + if (!hidden) { + pills.push( + + { + if (props.onChangeAccount) props.onChangeAccount(); + setPin(name); + }} + /> + + ); + } } return (