import React, { useState, useMemo, useEffect, useCallback } from 'react'; import { Button, Intent } from '@blueprintjs/core'; import DataTable from 'components/DataTable'; import Icon from 'components/Icon'; import { compose, formattedAmount } from 'utils'; import { AccountsListFieldCell, MoneyFieldCell, InputGroupCell, } from 'components/DataTableCells'; import { omit } from 'lodash'; import withAccounts from 'containers/Accounts/withAccounts'; import { FormattedMessage as T, useIntl } from 'react-intl'; // Actions cell renderer. const ActionsCellRenderer = ({ row: { index }, column: { id }, cell: { value: initialValue }, data, payload, }) => { if (data.length <= index + 2) { return ''; } const onClickRemoveRole = () => { payload.removeRow(index); }; return ( ); } export default compose(withAccounts)(MakeJournalEntriesTable);