fix: accounts list

This commit is contained in:
a.bouhuolia
2021-01-23 18:44:24 +02:00
parent 3f2387b875
commit 8557a85f42
5 changed files with 24 additions and 31 deletions

View File

@@ -8,17 +8,14 @@ import { FormattedMessage as T, useIntl } from 'react-intl';
import classNames from 'classnames';
import { Icon, Money, If, Choose } from 'components';
export function NormalCell({ cell }) {
export function NormalCell({ cell: { value } }) {
const { formatMessage } = useIntl();
const account = cell.row.original;
const normal = account?.type?.normal || '';
const arrowDirection = normal === 'credit' ? 'down' : 'up';
const arrowDirection = value === 'credit' ? 'down' : 'up';
return (
<Tooltip
className={Classes.TOOLTIP_INDICATOR}
content={formatMessage({ id: normal })}
content={formatMessage({ id: value })}
position={Position.RIGHT}
hoverOpenDelay={100}
>