Erste brauchbare Version
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { type ReactNode } from 'react';
|
||||
import config from '@payload-config';
|
||||
import { type ServerFunctionClientArgs } from 'payload';
|
||||
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts';
|
||||
import { importMap } from './admin/importMap';
|
||||
import '@payloadcms/next/css';
|
||||
|
||||
type Props = Readonly<{
|
||||
children: ReactNode;
|
||||
}>;
|
||||
|
||||
async function serverFunction(args: ServerFunctionClientArgs) {
|
||||
'use server';
|
||||
|
||||
return handleServerFunctions({
|
||||
...args,
|
||||
config,
|
||||
importMap
|
||||
});
|
||||
}
|
||||
|
||||
export default function Layout({ children }: Props) {
|
||||
return (
|
||||
<RootLayout
|
||||
config={config}
|
||||
importMap={importMap}
|
||||
serverFunction={serverFunction}
|
||||
>
|
||||
{children}
|
||||
</RootLayout>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user