From f93412af4c2bd935ad049aa879f8c090623763cd Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 22 Feb 2022 15:05:50 -0600 Subject: [PATCH] Test clientside re-render --- web/components/datetime-tooltip.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/components/datetime-tooltip.tsx b/web/components/datetime-tooltip.tsx index efb01961..04fab5cf 100644 --- a/web/components/datetime-tooltip.tsx +++ b/web/components/datetime-tooltip.tsx @@ -2,6 +2,7 @@ import dayjs from 'dayjs' import utc from 'dayjs/plugin/utc' import timezone from 'dayjs/plugin/timezone' import advanced from 'dayjs/plugin/advancedFormat' +import { useEffect, useState } from 'react' dayjs.extend(utc) dayjs.extend(timezone) @@ -17,6 +18,11 @@ export function DateTimeTooltip(props: { const formattedTime = dayjs(time).format('MMM DD, YYYY hh:mm a') const toolTip = text ? `${text} ${formattedTime}` : formattedTime + const [_, setIt] = useState() + useEffect(() => { + setIt(undefined) + }, []) + return ( <>