diff --git a/src/libs/ui/components/account-list/account-list.tsx b/src/libs/ui/components/account-list/account-list.tsx index dd1f85a64..d69c9bb4f 100644 --- a/src/libs/ui/components/account-list/account-list.tsx +++ b/src/libs/ui/components/account-list/account-list.tsx @@ -7,7 +7,6 @@ import { AlignedFlexRow, CenteredFlexRow, FlexColumn, - FlexRow, LeftAlignedFlexColumn, SpacingSize } from '@libs/layout'; @@ -22,13 +21,12 @@ import { sortAccounts } from '@libs/ui/components/account-list/utils'; import { getAccountHashFromPublicKey } from '@libs/entities/Account'; import { AccountActionsMenuPopover, + Avatar, Button, - Checkbox, Hash, HashVariant, List, - Typography, - ConnectionStatusBadge + Typography } from '@libs/ui'; import { RouterPath, useTypedNavigate } from '@popup/router'; import { WindowApp } from '@background/create-open-window'; @@ -38,22 +36,16 @@ const ListItemContainer = styled(FlexColumn)` min-height: 68px; height: 100%; - padding: 12px 8px 12px 16px; + padding: 16px 8px 16px 16px; `; -const ListItemClickableContainer = styled(FlexRow)` +const ListItemClickableContainer = styled(AlignedFlexRow)` width: 100%; cursor: pointer; `; const AccountNameWithHashListItemContainer = styled(LeftAlignedFlexColumn)` width: 100%; - - padding-left: 16px; -`; - -const ConnectionStatusBadgeContainer = styled.div` - margin-left: 44px; `; const ButtonContainer = styled(CenteredFlexRow)` @@ -91,17 +83,18 @@ export const AccountList = ({ closeModal }: AccountListProps) => { })); setAccountListRows(accountListRows); - // We need to sort the account list only on the component mount + // We need to sort the account list only on the component mount and when new accounts are added // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [accounts]); return ( { const isConnected = connectedAccountNames.includes(account.name); + const isActiveAccount = activeAccountName === account.name; return ( @@ -111,13 +104,15 @@ export const AccountList = ({ closeModal }: AccountListProps) => { changeActiveAccount(account.name); closeModal(event); }} + gap={SpacingSize.Medium} > - { onClick={closeModal} /> - {isConnected && ( - - - - )} ); }} - marginLeftForItemSeparatorLine={60} + marginLeftForItemSeparatorLine={70} renderFooter={() => (