fixed hydration mismatch

This commit is contained in:
Nicolas HOARAU 2026-06-22 12:57:24 +04:00
parent d826ee6a50
commit abdec720e1
6 changed files with 38 additions and 41 deletions

View file

@ -22,43 +22,13 @@ useSeoMeta({
<template> <template>
<UApp> <UApp>
<div class="flex flex-col min-h-screen"> <div class="flex flex-col min-h-screen">
<UHeader> <LazyAppHeader hydrate-on-interaction />
<template #left>
<NuxtLink to="/">
<AppLogo class="w-auto h-6 shrink-0" />
</NuxtLink>
<UButton to="/projects" label="Projects" color="neutral" variant="ghost" />
</template>
<template #right>
<UColorModeButton />
</template>
</UHeader>
<UMain class="px-6"> <UMain class="px-6">
<NuxtLayout>
<NuxtPage /> <NuxtPage />
</NuxtLayout>
</UMain> </UMain>
<USeparator icon="i-simple-icons-nuxtdotjs" /> <LazyAppFooter hydrate-on-interaction />
<UFooter>
<template #left>
<p class="text-sm text-muted">Built with Nuxt UI © {{ new Date().getFullYear() }}</p>
</template>
<template #right>
<UButton
to="https://github.com/nuxt-ui-templates/starter"
target="_blank"
icon="i-simple-icons-github"
aria-label="GitHub"
color="neutral"
variant="ghost" />
</template>
</UFooter>
</div> </div>
</UApp> </UApp>
</template> </template>

View file

@ -0,0 +1,19 @@
<template>
<USeparator icon="i-simple-icons-nuxtdotjs" />
<UFooter data-allow-mismatch="children">
<template #left>
<p class="text-sm text-muted">Built with Nuxt UI © {{ new Date().getFullYear() }}</p>
</template>
<template #right>
<UButton
to="https://github.com/nuxt-ui-templates/starter"
target="_blank"
icon="i-simple-icons-github"
aria-label="GitHub"
color="neutral"
variant="ghost" />
</template>
</UFooter>
</template>

View file

@ -0,0 +1,15 @@
<template>
<UHeader>
<template #left>
<NuxtLink to="/">
<AppLogo class="w-auto h-6 shrink-0" />
</NuxtLink>
<UButton to="/projects" label="Projects" color="neutral" variant="ghost" />
</template>
<template #right>
<UColorModeButton />
</template>
</UHeader>
</template>

View file

@ -1,3 +0,0 @@
<template>
<slot />
</template>

View file

@ -36,7 +36,7 @@ const columns: TableColumn<Project>[] = [
cell: ({ row }) => row.getValue("description") ?? "—", cell: ({ row }) => row.getValue("description") ?? "—",
}, },
{ accessorKey: "createdAt", header: "Created" }, { accessorKey: "createdAt", header: "Created" },
{ id: "actions", header: "" }, { id: "actions", header: "Actions" },
]; ];
</script> </script>

View file

@ -14,10 +14,6 @@ export default defineNuxtConfig({
}, },
}, },
routeRules: {
"/": { prerender: true },
},
compatibilityDate: "2025-01-15", compatibilityDate: "2025-01-15",
eslint: { eslint: {