Skip to content

Commit

Permalink
refactor: prettier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mananjadhav committed May 7, 2024
1 parent 9281743 commit 75145eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ export default {
invoiceAccountSelectorDescription:
'Como ha activado la exportación de facturas de Expensify a Xero, esta es la cuenta en la que aparecerá la factura una vez marcada como pagada.',
xeroBillPaymentAccountDescription:
"Como has activado la sincronización de los informes reembolsados, tendrás que seleccionar la cuenta bancaria de la que se producen estos reembolsos y crearemos el pago en Xero.",
'Como has activado la sincronización de los informes reembolsados, tendrás que seleccionar la cuenta bancaria de la que se producen estos reembolsos y crearemos el pago en Xero.',
},
},
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ function XeroAdvancedPage({policy}: WithPolicyConnectionsProps) {
const {bankAccounts} = policy?.connections?.xero?.data ?? {};
const {invoiceCollectionsAccountID, reimbursementAccountID} = sync ?? {};

const getSelectedAccountName = useMemo(() => (accountId: string) => {
const selectedAccount = (bankAccounts ?? []).find((bank) => bank.id === accountId);
return selectedAccount?.name ?? '';
}, [bankAccounts]);

const getSelectedAccountName = useMemo(
() => (accountId: string) => {
const selectedAccount = (bankAccounts ?? []).find((bank) => bank.id === accountId);
return selectedAccount?.name ?? '';
},
[bankAccounts],
);

const selectedBankAccountName = getSelectedAccountName(invoiceCollectionsAccountID ?? '');
const selectedBillPaymentAccountName = getSelectedAccountName(reimbursementAccountID ?? '');

Expand Down

0 comments on commit 75145eb

Please sign in to comment.