Commit 018283f7 by G

The date is formatted now to indicate how far we're from the provided date

parent 028b64de
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 (
<Box
// height={60}
......@@ -35,7 +41,7 @@ const TransactionInformationsItem = ({ paymentType, reference, date, amount, sta
</Box>
<Box height={50} flex={1}>
<Text variant={"black"}>{reference}</Text>
<Text>{date}</Text>
<Text>{moment(dateObject).fromNow()}</Text>
</Box>
<Box style={{ marginLeft: "auto" }} height={50}>
{/* <Text variant={"softYellow"} fontWeight={"bold"}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment