diff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.js index 1371911f6e1..4fa52ea959b 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccounts.js +++ b/packages/desktop-client/src/components/accounts/MobileAccounts.js @@ -123,7 +123,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) { ); } -function EmptyMessage({ onAdd }) { +function EmptyMessage() { return ( @@ -131,22 +131,6 @@ function EmptyMessage({ onAdd }) { account to automatically download transactions, or manage it locally yourself. - - - - - In the future, you can add accounts using the add button in the header. - ); } @@ -159,9 +143,8 @@ function AccountList({ getOffBudgetBalance, onAddAccount, onSelectAccount, + onSync, }) { - const { syncAndDownload } = useActions(); - const budgetedAccounts = accounts.filter(account => account.offbudget === 0); const offbudgetAccounts = accounts.filter(account => account.offbudget === 1); const noBackgroundColorStyle = { @@ -169,11 +152,6 @@ function AccountList({ color: 'white', }; - // If there are no accounts, show a helpful message - if (accounts.length === 0) { - return ; - } - return ( } > - - + {accounts.length === 0 && } + + {budgetedAccounts.length > 0 && ( + + )} {budgetedAccounts.map(acct => ( ))} - + {offbudgetAccounts.length > 0 && ( + + )} {offbudgetAccounts.map(acct => ( replaceModal('add-account')} onSelectAccount={onSelectAccount} onSelectTransaction={onSelectTransaction} + onSync={syncAndDownload} /> );