-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to latest payload and fix breaking changes
- Loading branch information
1 parent
06ece4a
commit aa16896
Showing
19 changed files
with
1,708 additions
and
1,411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 14 additions & 17 deletions
31
dev/src/app/(payload)/admin/[[...segments]]/not-found.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
import type { Metadata } from "next"; | ||
|
||
import config from "@payload-config"; | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import { NotFoundPage, generatePageMetadata } from "@payloadcms/next/views"; | ||
import { importMap } from "../importMap"; | ||
import type { Metadata } from 'next' | ||
|
||
import config from '@payload-config' | ||
import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' | ||
import { importMap } from '../importMap' | ||
|
||
type Args = { | ||
params: Promise<{ | ||
segments: string[]; | ||
}>; | ||
segments: string[] | ||
}> | ||
searchParams: Promise<{ | ||
[key: string]: string | string[]; | ||
}>; | ||
}; | ||
[key: string]: string | string[] | ||
}> | ||
} | ||
|
||
export const generateMetadata = ({ | ||
params, | ||
searchParams, | ||
}: Args): Promise<Metadata> => | ||
generatePageMetadata({ config, params, searchParams }); | ||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> => | ||
generatePageMetadata({ config, params, searchParams }) | ||
|
||
const NotFound = ({ params, searchParams }: Args) => | ||
NotFoundPage({ config, params, searchParams, importMap }); | ||
NotFoundPage({ config, params, searchParams, importMap }) | ||
|
||
export default NotFound; | ||
export default NotFound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
import type { Metadata } from "next"; | ||
|
||
import config from "@payload-config"; | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import { RootPage, generatePageMetadata } from "@payloadcms/next/views"; | ||
import { importMap } from "../importMap"; | ||
import type { Metadata } from 'next' | ||
|
||
import config from '@payload-config' | ||
import { RootPage, generatePageMetadata } from '@payloadcms/next/views' | ||
import { importMap } from '../importMap' | ||
|
||
type Args = { | ||
params: Promise<{ | ||
segments: string[]; | ||
}>; | ||
segments: string[] | ||
}> | ||
searchParams: Promise<{ | ||
[key: string]: string | string[]; | ||
}>; | ||
}; | ||
[key: string]: string | string[] | ||
}> | ||
} | ||
|
||
export const generateMetadata = ({ | ||
params, | ||
searchParams, | ||
}: Args): Promise<Metadata> => | ||
generatePageMetadata({ config, params, searchParams }); | ||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> => | ||
generatePageMetadata({ config, params, searchParams }) | ||
|
||
const Page = ({ params, searchParams }: Args) => | ||
RootPage({ config, params, searchParams, importMap }); | ||
RootPage({ config, params, searchParams, importMap }) | ||
|
||
export default Page; | ||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' | ||
import '@payloadcms/next/css' | ||
import { | ||
REST_DELETE, | ||
REST_GET, | ||
REST_OPTIONS, | ||
REST_PATCH, | ||
REST_POST, | ||
REST_PUT, | ||
} from '@payloadcms/next/routes' | ||
|
||
export const GET = REST_GET(config) | ||
export const POST = REST_POST(config) | ||
export const DELETE = REST_DELETE(config) | ||
export const PATCH = REST_PATCH(config) | ||
export const PUT = REST_PUT(config) | ||
export const OPTIONS = REST_OPTIONS(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
import '@payloadcms/next/css' | ||
import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' | ||
|
||
export const GET = GRAPHQL_PLAYGROUND_GET(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
import { GRAPHQL_POST } from '@payloadcms/next/routes' | ||
import { GRAPHQL_POST, REST_OPTIONS } from '@payloadcms/next/routes' | ||
|
||
export const POST = GRAPHQL_POST(config) | ||
|
||
export const OPTIONS = REST_OPTIONS(config) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
import configPromise from "@payload-config"; | ||
import "@payloadcms/next/css"; | ||
import { RootLayout } from "@payloadcms/next/layouts"; | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from "@payload-config"; | ||
import "@payloadcms/next/css"; | ||
import type { ServerFunctionClient } from "payload"; | ||
import { handleServerFunctions, RootLayout } from "@payloadcms/next/layouts"; | ||
import React from "react"; | ||
import { importMap } from "./admin/importMap.js"; | ||
|
||
import "./custom.scss"; | ||
import { importMap } from "./admin/importMap.js"; | ||
|
||
type Args = { | ||
children: React.ReactNode; | ||
children: React.ReactNode; | ||
}; | ||
|
||
const serverFunction: ServerFunctionClient = async function (args) { | ||
"use server"; | ||
return handleServerFunctions({ | ||
...args, | ||
config, | ||
importMap, | ||
}); | ||
}; | ||
|
||
const Layout = ({ children }: Args) => ( | ||
<RootLayout config={configPromise} importMap={importMap}> | ||
{children} | ||
</RootLayout> | ||
<RootLayout config={config} importMap={importMap} serverFunction={serverFunction}> | ||
{children} | ||
</RootLayout> | ||
); | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.