Skip to content

Commit

Permalink
use mapping for synced transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd committed Jan 28, 2025
1 parent 28d05e6 commit 4b69c99
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 255 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-strict-ignore
import React, { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Trans } from 'react-i18next';

import { format } from 'loot-core/src/shared/months';
import { type AccountEntity } from 'loot-core/src/types/models';
Expand Down Expand Up @@ -28,7 +28,6 @@ type AccountRowProps = {

export const AccountRow = memo(
({ account, hovered, onHover, onAction }: AccountRowProps) => {
const { t } = useTranslation();
const backgroundFocus = hovered;

const dateFormat = useDateFormat() || 'MM/dd/yyyy';
Expand Down Expand Up @@ -72,19 +71,19 @@ export const AccountRow = memo(
plain
style={{ color: theme.tableText, padding: '10px' }}
>
{lastSync}
{account.account_sync_source ? lastSync : ''}
</Cell>

{account.account_sync_source ? (
<Cell name="edit" plain style={{ paddingRight: '10px' }}>
<Button onPress={() => onAction(account, 'edit')}>
{t('Edit')}
<Trans>Edit</Trans>
</Button>
</Cell>
) : (
<Cell name="link" plain style={{ paddingRight: '10px' }}>
<Button onPress={() => onAction(account, 'link')}>
{t('Link account')}
<Trans>Link account</Trans>
</Button>
</Cell>
)}
Expand Down
Loading

0 comments on commit 4b69c99

Please sign in to comment.