fix: move DevToolbar dynamic import to Client Component

ssr: false is not allowed with next/dynamic in Server Components.
Extracted the dynamic() call into DevToolbarLoader.tsx ('use client')
so layout.tsx stays a pure Server Component.
This commit is contained in:
ralksta
2026-03-13 12:28:59 +01:00
parent 33fd31e926
commit 60b86b540f
2 changed files with 16 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
'use client';
import dynamic from 'next/dynamic';
// ssr: false ist nur in Client Components erlaubt
const DevToolbar = dynamic(
() => import('@/components/DevToolbar').then(m => ({ default: m.DevToolbar })),
{ ssr: false }
);
export function DevToolbarLoader() {
return <DevToolbar />;
}