Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
okcodes committed Oct 16, 2020
1 parent b245126 commit d660c86
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/views/FlowOperationList/components/AccountPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,19 @@ export const AccountPicker = ({open, handleClose, dropDownDataForCashAccounts: a
<Dialog open={open} onClose={handleClose} TransitionComponent={Transition} className={classes.dialogRoot}>
<DialogTitle>{title}</DialogTitle>
<DialogContent>
<AccountPickerTree accountNames={accounts.map(account => account.name)} separator={'/'}
onClick={data => {
const isLeaf = !data.subBranches.length;
if (isLeaf) {
const account = accounts.find(account => normalizePath(account.name) === data.fullPath);
if (account) {
onAccountPicked(account);
} else {
console.error('Could not find account', {account, data, accounts});
}
}
}}
<AccountPickerTree
accountNames={accounts.map(account => account.name)} separator={'/'}
onClick={data => {
const isLeaf = !data.subBranches.length;
if (isLeaf) {
const account = accounts.find(account => normalizePath(account.name) === data.fullPath);
if (account) {
onAccountPicked(account);
} else {
console.error('Could not find account', {account, data, accounts});
}
}
}}
/>
</DialogContent>
<DialogActions>
Expand Down

0 comments on commit d660c86

Please sign in to comment.