diff --git a/packages/web-app/src/modules/achievements-views/components/AchievementCard.tsx b/packages/web-app/src/modules/achievements-views/components/AchievementCard.tsx index 8b5b17ebb..b0a5625ad 100644 --- a/packages/web-app/src/modules/achievements-views/components/AchievementCard.tsx +++ b/packages/web-app/src/modules/achievements-views/components/AchievementCard.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames' import type CSS from 'csstype' +import { DateTime } from 'luxon' import { Img } from 'react-image' import type { WithStyles } from 'react-jss' import withStyles from 'react-jss' @@ -80,6 +81,7 @@ interface Props extends WithStyles { } const _AchievementCard = ({ title, imageUrl, description, isAchieved, dateAchieved, classes }: Props) => { + const dateAchievedFormatted = dateAchieved ? DateTime.fromISO(dateAchieved).toFormat('MMM d, yyyy') : null return (
} /> - {dateAchieved &&

{dateAchieved}

} + {dateAchievedFormatted &&

{`Achieved on ${dateAchievedFormatted}`}

}
) }