Skip to content

Commit 4909f8e

Browse files
momoclaude
authored andcommitted
Fix SSR hydration mismatch causing blank page and static footer
- Remove :key="lang" on Layout (VitePress handles locale reactivity natively) - Wrap PixelRobots in ClientOnly to avoid SSR/client Date mismatch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 98902b8 commit 4909f8e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/.vitepress/theme/Layout.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<script setup>
22
import DefaultTheme from 'vitepress/theme'
3-
import { useData } from 'vitepress'
43
import LicenseSelector from '../components/LicenseSelector.vue'
54
import PixelRobots from '../components/PixelRobots.vue'
65
76
const { Layout } = DefaultTheme
8-
const { lang } = useData()
97
</script>
108

119
<template>
12-
<Layout :key="lang">
10+
<Layout>
1311
<template #home-hero-image>
1412
<LicenseSelector />
1513
</template>
1614
<template #layout-bottom>
17-
<PixelRobots />
15+
<ClientOnly>
16+
<PixelRobots />
17+
</ClientOnly>
1818
</template>
1919
</Layout>
2020
</template>

0 commit comments

Comments
 (0)