Skip to content

Commit

Permalink
Fix width
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Feb 27, 2025
1 parent 2be393d commit 8919bd8
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function AccountListItem({
<Button
onPress={() => onSelect(account.id)}

Check failure on line 135 in packages/desktop-client/src/components/mobile/accounts/Accounts.tsx

View workflow job for this annotation

GitHub Actions / typecheck

'account' is possibly 'undefined'.
style={{
width: '100%',
border: `1px solid ${theme.pillBorder}`,
borderRadius: 6,
boxShadow: `0 1px 1px ${theme.mobileAccountShadow}`,
Expand Down Expand Up @@ -319,27 +320,27 @@ function AccountList({
const syncingAccountIds = useSelector(state => state.account.accountsSyncing);
const updatedAccounts = useSelector(state => state.queries.updatedAccounts);

const accountList = useListData({
const accountListData = useListData({
initialItems: accounts,
});

const { dragAndDropHooks } = useDragAndDrop({
getItems: keys =>
[...keys].map(key => ({
'text/plain': accountList.getItem(key).id,
'text/plain': accountListData.getItem(key).id,
})),
onReorder(e) {
if (e.target.dropPosition === 'before') {
accountList.moveBefore(e.target.key, e.keys);
accountListData.moveBefore(e.target.key, e.keys);
} else if (e.target.dropPosition === 'after') {
accountList.moveAfter(e.target.key, e.keys);
accountListData.moveAfter(e.target.key, e.keys);
}
},
});
return (
<ListBox
aria-label={ariaLabel}
items={accountList.items}
items={accountListData.items}
dragAndDropHooks={dragAndDropHooks}
>
{account => (
Expand All @@ -351,7 +352,7 @@ function AccountList({
pending={syncingAccountIds.includes(account.id)}
failed={failedAccounts && failedAccounts.has(account.id)}
getBalanceQuery={getBalanceBinding}
onSelect={id => onOpenAccount(accountList.getItem(id))}
onSelect={id => onOpenAccount(accountListData.getItem(id))}
/>
)}
</ListBox>
Expand Down

0 comments on commit 8919bd8

Please sign in to comment.