Skip to content

Commit

Permalink
DonorsAndDonations.tsx: Use createdAt field, to show when donation wa…
Browse files Browse the repository at this point in the history
…s created (#1749)
  • Loading branch information
sashko9807 authored Mar 24, 2024
1 parent 2c1d2f0 commit 67d0e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/client/campaigns/DonorsAndDonations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function DonorsAndDonations({ donations }: { donations: CampaignD
<Root>
<Grid item className={classes.donationsWrapper} data-testid="summary-donors-wrapper">
{donationsToShow && donationsToShow.length !== 0 ? (
donationsToShow.map(({ type, metadata, person, amount, updatedAt, currency }, key) => (
donationsToShow.map(({ type, metadata, person, amount, createdAt, currency }, key) => (
<Grid key={key} className={classes.donationItemWrapper}>
<AccountCircleIcon
sx={{ position: 'relative', bottom: !metadata || !metadata.name ? 0 : 8 }}
Expand Down Expand Up @@ -124,7 +124,7 @@ export default function DonorsAndDonations({ donations }: { donations: CampaignD
<Typography>{moneyPublic(amount, currency)}</Typography>
<span className={classes.separatorIcon}>|</span>
<Typography>
{formatDistanceStrict(parseISO(updatedAt), new Date(), {
{formatDistanceStrict(parseISO(createdAt), new Date(), {
locale: i18n?.language == 'bg' ? bg : enUS,
addSuffix: true,
})}
Expand Down

0 comments on commit 67d0e98

Please sign in to comment.