From 1c9e118d3e4ea57aaa0e8cbb514aa4dd934bcebd Mon Sep 17 00:00:00 2001 From: Octobug Date: Wed, 15 Nov 2023 11:49:10 +0800 Subject: [PATCH] debug: hydration mismatch --- .vitepress/theme/components/ProfileExtra.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vitepress/theme/components/ProfileExtra.vue b/.vitepress/theme/components/ProfileExtra.vue index dc26e6e..7d3dc9b 100644 --- a/.vitepress/theme/components/ProfileExtra.vue +++ b/.vitepress/theme/components/ProfileExtra.vue @@ -7,7 +7,7 @@ fill="var(--vp-c-text-2)" /> - {{ location }} + {{ location }}
  • @@ -16,9 +16,7 @@ fill="var(--vp-c-text-2)" /> - - {{ `${nowWithTZ.format("HH:mm")} (${nowWithTZ.format("UTC Z")})` }} - + {{ `${hourMinute} (${utcz})` }}
  • @@ -29,6 +27,8 @@ import { useData } from "vitepress"; const { theme } = useData(); const { location, timezone } = theme.value; const nowWithTZ = moment().tz(timezone); +const hourMinute: string = nowWithTZ.format("HH:mm"); +const utcz: string = nowWithTZ.format("UTC Z");