From 83696cca213333a2488bb54e63634fd9be843ad9 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 31 Aug 2022 15:35:34 -0500 Subject: [PATCH] Fix dayjs fromNow bug (it requires plugin, so use our util instead) --- web/components/relative-timestamp.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/components/relative-timestamp.tsx b/web/components/relative-timestamp.tsx index 53cf2a3a..d4b1c189 100644 --- a/web/components/relative-timestamp.tsx +++ b/web/components/relative-timestamp.tsx @@ -1,16 +1,15 @@ import { DateTimeTooltip } from './datetime-tooltip' -import dayjs from 'dayjs' import React from 'react' +import { fromNow } from 'web/lib/util/time' export function RelativeTimestamp(props: { time: number }) { const { time } = props - const dayJsTime = dayjs(time) return ( - {dayJsTime.fromNow()} + {fromNow(time)} ) }