From 78c8711a79c6746c744a339798fbcbc813e9b0a1 Mon Sep 17 00:00:00 2001 From: Athou Date: Sat, 17 Jun 2023 22:51:18 +0200 Subject: [PATCH] add tooltips to all relative dates with exact time --- commafeed-client/src/components/RelativeDate.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commafeed-client/src/components/RelativeDate.tsx b/commafeed-client/src/components/RelativeDate.tsx index 67129755..7d786e2d 100644 --- a/commafeed-client/src/components/RelativeDate.tsx +++ b/commafeed-client/src/components/RelativeDate.tsx @@ -1,4 +1,5 @@ import { Trans } from "@lingui/macro" +import { Tooltip } from "@mantine/core" import dayjs from "dayjs" import { useEffect, useState } from "react" @@ -10,5 +11,10 @@ export function RelativeDate(props: { date: Date | number | undefined }) { }, []) if (!props.date) return N/A - return <>{dayjs(props.date).from(dayjs(now))} + const date = dayjs(props.date) + return ( + + {date.from(dayjs(now))} + + ) }