diff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.js index d8305459957..eda891234a0 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccounts.js +++ b/packages/desktop-client/src/components/accounts/MobileAccounts.js @@ -125,7 +125,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) { ); } -function EmptyMessage({ onAdd }) { +function EmptyMessage() { return ( @@ -133,22 +133,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. - ); } @@ -161,9 +145,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 = { @@ -171,11 +154,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} /> );