From 66db2d5645629a763dd1e0ad02dac7c9f83a671d Mon Sep 17 00:00:00 2001 From: alecdwm Date: Thu, 13 Jul 2023 00:58:45 +0000 Subject: [PATCH] fix: folder design in portfolio account selector --- .../ui/domains/Portfolio/AccountSelect.tsx | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/apps/extension/src/ui/domains/Portfolio/AccountSelect.tsx b/apps/extension/src/ui/domains/Portfolio/AccountSelect.tsx index 95eb9ab8d5..34f888fbd2 100644 --- a/apps/extension/src/ui/domains/Portfolio/AccountSelect.tsx +++ b/apps/extension/src/ui/domains/Portfolio/AccountSelect.tsx @@ -267,6 +267,8 @@ const Item = forwardRef(function Item( const isAccount = item && item.type === "account" const isFolder = item && item.type === "folder" + if (isFolder) return + const icon = isAllAccounts ? ( ) : isAccount ? ( @@ -280,7 +282,7 @@ const Item = forwardRef(function Item( {t("All Accounts")} ) : ( -
+
{item.name}
{isAccount && }
@@ -328,3 +330,25 @@ const Item = forwardRef(function Item(
) }) + +type FolderItemProps = { + item?: AccountSelectFolderItem + collapsed?: boolean +} +const FolderItem = forwardRef(function FolderItem( + { item, collapsed }, + ref +) { + return ( +
+ +
{item?.name}
+
{item?.addresses.length}
+
+ ) +})