create-payload-app 3.0.0-canary.bda91d8 → 3.0.0-canary.be89809

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,8 @@
2
2
  /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
3
  import config from '@payload-config'
4
4
  import '@payloadcms/next/css'
5
- import { RootLayout } from '@payloadcms/next/layouts'
5
+ import type { ServerFunctionClient } from 'payload'
6
+ import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts'
6
7
  import React from 'react'
7
8
 
8
9
  import { importMap } from './admin/importMap.js'
@@ -12,8 +13,17 @@ type Args = {
12
13
  children: React.ReactNode
13
14
  }
14
15
 
16
+ const serverFunction: ServerFunctionClient = async function (args) {
17
+ 'use server'
18
+ return handleServerFunctions({
19
+ ...args,
20
+ config,
21
+ importMap,
22
+ })
23
+ }
24
+
15
25
  const Layout = ({ children }: Args) => (
16
- <RootLayout config={config} importMap={importMap}>
26
+ <RootLayout config={config} importMap={importMap} serverFunction={serverFunction}>
17
27
  {children}
18
28
  </RootLayout>
19
29
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-payload-app",
3
- "version": "3.0.0-canary.bda91d8",
3
+ "version": "3.0.0-canary.be89809",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",