diff --git a/src/components/TransactionInformationsItem.tsx b/src/components/TransactionInformationsItem.tsx index 4263605..4fb68df 100644 --- a/src/components/TransactionInformationsItem.tsx +++ b/src/components/TransactionInformationsItem.tsx @@ -1,4 +1,6 @@ import type { PaymentCode } from "@/utils/requests/Types"; +import moment from "moment"; +import "moment/locale/fr"; import PaymentOption from "./PaymentOption"; import Box from "./bases/Box"; import Text from "./bases/Text"; @@ -11,7 +13,11 @@ interface Props { status: "SUCCESS" | "INITIATED" | "FAILED"; } +moment.locale("fr"); + const TransactionInformationsItem = ({ paymentType, reference, date, amount, status }: Props) => { + // date = new Date(date); + const dateObject = Date.parse(date); return ( {reference} - {date} + {moment(dateObject).fromNow()} {/*