chore(templates): update templates with next.js promises (#8547)
Updates templates according to this PR https://github.com/payloadcms/payload/pull/8489
This commit is contained in:
@@ -21,10 +21,10 @@
|
|||||||
"@payloadcms/richtext-lexical": "beta",
|
"@payloadcms/richtext-lexical": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"sharp": "0.32.6"
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
"@payloadcms/richtext-lexical": "beta",
|
"@payloadcms/richtext-lexical": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"sharp": "0.32.6"
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
"@payloadcms/storage-vercel-blob": "beta",
|
"@payloadcms/storage-vercel-blob": "beta",
|
||||||
"@vercel/blob": "^0.22.3",
|
"@vercel/blob": "^0.22.3",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"next": "15.0.0-canary.53",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-6230622a1a-20240610",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-6230622a1a-20240610",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"sharp": "0.32.6"
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"autoprefixer": "^10.0.1",
|
"autoprefixer": "^10.0.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.53",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"tailwindcss": "^3.3.0",
|
"tailwindcss": "^3.3.0",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import config from '@payload-config'
|
|||||||
import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
|
import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -41,12 +41,12 @@
|
|||||||
"jsonwebtoken": "9.0.2",
|
"jsonwebtoken": "9.0.2",
|
||||||
"lexical": "0.18.0",
|
"lexical": "0.18.0",
|
||||||
"lucide-react": "^0.378.0",
|
"lucide-react": "^0.378.0",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"payload-admin-bar": "^1.0.6",
|
"payload-admin-bar": "^1.0.6",
|
||||||
"prism-react-renderer": "^2.3.1",
|
"prism-react-renderer": "^2.3.1",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-hook-form": "7.45.4",
|
"react-hook-form": "7.45.4",
|
||||||
"sharp": "0.32.6",
|
"sharp": "0.32.6",
|
||||||
"tailwind-merge": "^2.3.0",
|
"tailwind-merge": "^2.3.0",
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"tailwindcss": "^3.4.3",
|
"tailwindcss": "^3.4.3",
|
||||||
|
|||||||
@@ -34,7 +34,14 @@ export async function generateStaticParams() {
|
|||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Page({ params: { slug = 'home' } }) {
|
type Args = {
|
||||||
|
params: Promise<{
|
||||||
|
slug?: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function Page({ params: paramsPromise }: Args) {
|
||||||
|
const { slug = 'home' } = await paramsPromise
|
||||||
const url = '/' + slug
|
const url = '/' + slug
|
||||||
|
|
||||||
let page: PageType | null
|
let page: PageType | null
|
||||||
@@ -75,7 +82,7 @@ export async function generateMetadata({ params: { slug = 'home' } }): Promise<M
|
|||||||
}
|
}
|
||||||
|
|
||||||
const queryPageBySlug = cache(async ({ slug }: { slug: string }) => {
|
const queryPageBySlug = cache(async ({ slug }: { slug: string }) => {
|
||||||
const { isEnabled: draft } = draftMode()
|
const { isEnabled: draft } = await draftMode()
|
||||||
|
|
||||||
const payload = await getPayloadHMR({ config: configPromise })
|
const payload = await getPayloadHMR({ config: configPromise })
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { draftMode } from 'next/headers'
|
|||||||
import './globals.css'
|
import './globals.css'
|
||||||
|
|
||||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||||
const { isEnabled } = draftMode()
|
const { isEnabled } = await draftMode()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html className={cn(GeistSans.variable, GeistMono.variable)} lang="en" suppressHydrationWarning>
|
<html className={cn(GeistSans.variable, GeistMono.variable)} lang="en" suppressHydrationWarning>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { draftMode } from 'next/headers'
|
import { draftMode } from 'next/headers'
|
||||||
|
|
||||||
export async function GET(): Promise<Response> {
|
export async function GET(): Promise<Response> {
|
||||||
draftMode().disable()
|
const draft = await draftMode()
|
||||||
|
draft.disable()
|
||||||
return new Response('Draft mode is disabled')
|
return new Response('Draft mode is disabled')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { draftMode } from 'next/headers'
|
import { draftMode } from 'next/headers'
|
||||||
|
|
||||||
export async function GET(): Promise<Response> {
|
export async function GET(): Promise<Response> {
|
||||||
draftMode().disable()
|
const draft = await draftMode()
|
||||||
|
draft.disable()
|
||||||
return new Response('Draft mode is disabled')
|
return new Response('Draft mode is disabled')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,9 +56,11 @@ export async function GET(
|
|||||||
payload.logger.error('Error verifying token for live preview:', error)
|
payload.logger.error('Error verifying token for live preview:', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const draft = await draftMode()
|
||||||
|
|
||||||
// You can add additional checks here to see if the user is allowed to preview this page
|
// You can add additional checks here to see if the user is allowed to preview this page
|
||||||
if (!user) {
|
if (!user) {
|
||||||
draftMode().disable()
|
draft.disable()
|
||||||
return new Response('You are not allowed to preview this page', { status: 403 })
|
return new Response('You are not allowed to preview this page', { status: 403 })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +82,8 @@ export async function GET(
|
|||||||
payload.logger.error('Error verifying token for live preview:', error)
|
payload.logger.error('Error verifying token for live preview:', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
draftMode().enable()
|
draft.enable()
|
||||||
|
|
||||||
redirect(path)
|
redirect(path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,14 @@ export async function generateStaticParams() {
|
|||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Post({ params: { slug = '' } }) {
|
type Args = {
|
||||||
|
params: Promise<{
|
||||||
|
slug?: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function Post({ params: paramsPromise }: Args) {
|
||||||
|
const { slug = '' } = await paramsPromise
|
||||||
const url = '/posts/' + slug
|
const url = '/posts/' + slug
|
||||||
const post = await queryPostBySlug({ slug })
|
const post = await queryPostBySlug({ slug })
|
||||||
|
|
||||||
@@ -65,18 +72,15 @@ export default async function Post({ params: { slug = '' } }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({ params: paramsPromise }: Args): Promise<Metadata> {
|
||||||
params: { slug },
|
const { slug = '' } = await paramsPromise
|
||||||
}: {
|
|
||||||
params: { slug: string }
|
|
||||||
}): Promise<Metadata> {
|
|
||||||
const post = await queryPostBySlug({ slug })
|
const post = await queryPostBySlug({ slug })
|
||||||
|
|
||||||
return generateMeta({ doc: post })
|
return generateMeta({ doc: post })
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryPostBySlug = cache(async ({ slug }: { slug: string }) => {
|
const queryPostBySlug = cache(async ({ slug }: { slug: string }) => {
|
||||||
const { isEnabled: draft } = draftMode()
|
const { isEnabled: draft } = await draftMode()
|
||||||
|
|
||||||
const payload = await getPayloadHMR({ config: configPromise })
|
const payload = await getPayloadHMR({ config: configPromise })
|
||||||
|
|
||||||
|
|||||||
@@ -7,17 +7,29 @@ import configPromise from '@payload-config'
|
|||||||
import { getPayloadHMR } from '@payloadcms/next/utilities'
|
import { getPayloadHMR } from '@payloadcms/next/utilities'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PageClient from './page.client'
|
import PageClient from './page.client'
|
||||||
|
import { notFound } from 'next/navigation'
|
||||||
|
|
||||||
export const revalidate = 600
|
export const revalidate = 600
|
||||||
|
|
||||||
export default async function Page({ params: { pageNumber } }) {
|
type Args = {
|
||||||
|
params: Promise<{
|
||||||
|
pageNumber: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function Page({ params: paramsPromise }: Args) {
|
||||||
|
const { pageNumber } = await paramsPromise
|
||||||
const payload = await getPayloadHMR({ config: configPromise })
|
const payload = await getPayloadHMR({ config: configPromise })
|
||||||
|
|
||||||
|
const sanitizedPageNumber = Number(pageNumber)
|
||||||
|
|
||||||
|
if (!Number.isInteger(sanitizedPageNumber)) notFound()
|
||||||
|
|
||||||
const posts = await payload.find({
|
const posts = await payload.find({
|
||||||
collection: 'posts',
|
collection: 'posts',
|
||||||
depth: 1,
|
depth: 1,
|
||||||
limit: 12,
|
limit: 12,
|
||||||
page: pageNumber,
|
page: sanitizedPageNumber,
|
||||||
overrideAccess: false,
|
overrideAccess: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -50,7 +62,8 @@ export default async function Page({ params: { pageNumber } }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function generateMetadata({ params: { pageNumber } }): Metadata {
|
export async function generateMetadata({ params: paramsPromise }: Args): Promise<Metadata> {
|
||||||
|
const { pageNumber } = await paramsPromise
|
||||||
return {
|
return {
|
||||||
title: `Payload Website Template Posts Page ${pageNumber || ''}`,
|
title: `Payload Website Template Posts Page ${pageNumber || ''}`,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,14 @@ import React from 'react'
|
|||||||
import { Post } from '@/payload-types'
|
import { Post } from '@/payload-types'
|
||||||
import { Search } from '@/search/Component'
|
import { Search } from '@/search/Component'
|
||||||
import PageClient from './page.client'
|
import PageClient from './page.client'
|
||||||
export default async function Page({ searchParams }: { searchParams: { q: string } }) {
|
|
||||||
const query = searchParams.q
|
type Args = {
|
||||||
|
searchParams: Promise<{
|
||||||
|
q: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
export default async function Page({ searchParams: searchParamsPromise }: Args) {
|
||||||
|
const { q: query } = await searchParamsPromise
|
||||||
const payload = await getPayloadHMR({ config: configPromise })
|
const payload = await getPayloadHMR({ config: configPromise })
|
||||||
|
|
||||||
const posts = await payload.find({
|
const posts = await payload.find({
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
"@payloadcms/richtext-lexical": "beta",
|
"@payloadcms/richtext-lexical": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"sharp": "0.32.6"
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
"@payloadcms/richtext-lexical": "beta",
|
"@payloadcms/richtext-lexical": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918",
|
"react-dom": "19.0.0-rc-3edc000d-20240926",
|
||||||
"sharp": "0.32.6"
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -22,17 +22,17 @@
|
|||||||
"@payloadcms/storage-vercel-blob": "beta",
|
"@payloadcms/storage-vercel-blob": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918"
|
"react-dom": "19.0.0-rc-3edc000d-20240926"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
@@ -23,17 +23,17 @@
|
|||||||
"@payloadcms/storage-vercel-blob": "beta",
|
"@payloadcms/storage-vercel-blob": "beta",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"next": "15.0.0-canary.160",
|
"next": "15.0.0-canary.173",
|
||||||
"payload": "beta",
|
"payload": "beta",
|
||||||
"react": "19.0.0-rc-5dcb0097-20240918",
|
"react": "19.0.0-rc-3edc000d-20240926",
|
||||||
"react-dom": "19.0.0-rc-5dcb0097-20240918"
|
"react-dom": "19.0.0-rc-3edc000d-20240926"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "15.0.0-canary.160",
|
"eslint-config-next": "15.0.0-canary.173",
|
||||||
"typescript": "5.6.2"
|
"typescript": "5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
|||||||
import { importMap } from '../importMap'
|
import { importMap } from '../importMap'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: Promise<{
|
||||||
segments: string[]
|
segments: string[]
|
||||||
}
|
}>
|
||||||
searchParams: {
|
searchParams: Promise<{
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[]
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
|
|||||||
Reference in New Issue
Block a user