Display relay consumption history

This commit is contained in:
2024-09-26 22:51:43 +02:00
parent 903f1fa8ce
commit 7895b9eca8
10 changed files with 101 additions and 12 deletions

View File

@ -61,7 +61,10 @@ export function TimeWidget(p: {
}): React.ReactElement {
if (!p.time) return <></>;
return (
<Tooltip title={formatDate(p.time)} arrow>
<Tooltip
title={formatDate(p.diff ? new Date().getTime() / 1000 - p.time : p.time)}
arrow
>
<span>{p.diff ? timeDiff(0, p.time) : timeDiffFromNow(p.time)}</span>
</Tooltip>
);