fix(clock): suppress live timestamp hydration noise
This commit is contained in:
1 file changed
+8
-2
@@ -43,13 +43,19 @@ export default function ClockWidget({ options, width }: WidgetComponentProps<"cl
|
|||||||
{options.customTitle}
|
{options.customTitle}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
<Title className="clock-time-text" fw={700} order={sizing === "md" ? 2 : sizing === "sm" ? 4 : 6} lh="1">
|
<Title
|
||||||
|
className="clock-time-text"
|
||||||
|
fw={700}
|
||||||
|
order={sizing === "md" ? 2 : sizing === "sm" ? 4 : 6}
|
||||||
|
lh="1"
|
||||||
|
suppressHydrationWarning
|
||||||
|
>
|
||||||
{options.customTimeFormat
|
{options.customTimeFormat
|
||||||
? dayjs(time).tz(timezone).format(customTimeFormat)
|
? dayjs(time).tz(timezone).format(customTimeFormat)
|
||||||
: dayjs(time).tz(timezone).format(timeFormat)}
|
: dayjs(time).tz(timezone).format(timeFormat)}
|
||||||
</Title>
|
</Title>
|
||||||
{options.showDate && (
|
{options.showDate && (
|
||||||
<Text className="clock-date-text" size={sizing} lineClamp={1}>
|
<Text className="clock-date-text" size={sizing} lineClamp={1} suppressHydrationWarning>
|
||||||
{options.customDateFormat
|
{options.customDateFormat
|
||||||
? dayjs(time).tz(timezone).format(customDateFormat)
|
? dayjs(time).tz(timezone).format(customDateFormat)
|
||||||
: dayjs(time).tz(timezone).format(dateFormat)}
|
: dayjs(time).tz(timezone).format(dateFormat)}
|
||||||
|
|||||||
Reference in new issue
Block a user