From dbb8057223c089bd6a17c82a05eccd33fc881bbc Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Fri, 12 Aug 2022 17:33:08 -0700 Subject: [PATCH] Remove extra wrapper from `RelativeTimestamp` --- web/components/datetime-tooltip.tsx | 5 +++-- web/components/relative-timestamp.tsx | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/components/datetime-tooltip.tsx b/web/components/datetime-tooltip.tsx index cc195add..d820e728 100644 --- a/web/components/datetime-tooltip.tsx +++ b/web/components/datetime-tooltip.tsx @@ -11,16 +11,17 @@ dayjs.extend(advanced) export function DateTimeTooltip(props: { time: Dayjs text?: string + className?: string children?: React.ReactNode noTap?: boolean }) { - const { time, text, noTap } = props + const { className, time, text, noTap } = props const formattedTime = time.format('MMM DD, YYYY hh:mm a z') const toolTip = text ? `${text} ${formattedTime}` : formattedTime return ( - + {props.children} ) diff --git a/web/components/relative-timestamp.tsx b/web/components/relative-timestamp.tsx index 2cb1d908..bd029cf6 100644 --- a/web/components/relative-timestamp.tsx +++ b/web/components/relative-timestamp.tsx @@ -6,10 +6,11 @@ export function RelativeTimestamp(props: { time: number }) { const { time } = props const dayJsTime = dayjs(time) return ( - - - {dayJsTime.fromNow()} - + + {dayJsTime.fromNow()} ) }