feat(cms): migrate from directus to payloadcms
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 4s
Build & Deploy / 🧪 QA (push) Successful in 2m55s
Build & Deploy / 🏗️ Build (push) Successful in 11m40s
Build & Deploy / 🚀 Deploy (push) Failing after 8s
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s

This commit is contained in:
2026-02-27 12:56:35 +01:00
parent fb87fd52f7
commit 55cb073a6d
31 changed files with 8104 additions and 563 deletions

36
app/(payload)/layout.tsx Normal file
View File

@@ -0,0 +1,36 @@
import configPromise from "@payload-config";
import { RootLayout } from "@payloadcms/next/layouts";
import React from "react";
import "@payloadcms/next/css";
import "./custom.scss";
import { handleServerFunctions } from "@payloadcms/next/layouts";
import { importMap } from "./admin/importMap";
type Args = {
children: React.ReactNode;
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const serverFunction: any = async function (args: any) {
"use server";
return handleServerFunctions({
...args,
config: configPromise,
importMap,
});
};
const Layout = ({ children }: Args) => {
return (
<RootLayout
config={configPromise}
importMap={importMap}
serverFunction={serverFunction}
>
{children}
</RootLayout>
);
};
export default Layout;