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.
14 lines
298 B
TypeScript
14 lines
298 B
TypeScript
'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 />;
|
|
}
|