chore: types more app exports
This commit is contained in:
parent
87b5cc7762
commit
cbe282b5fd
@ -1,13 +1,26 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { Document, generateMetadata as generateMeta } from '@payloadcms/next/pages/Document'
|
||||
import { Document, generateMetadata as generateMeta } from '@payloadcms/next/pages/Document/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
export const generateMetadata = async ({ params }) => generateMeta({ config, params })
|
||||
type Args = {
|
||||
params: {
|
||||
global?: string
|
||||
collection?: string
|
||||
segments: string[]
|
||||
}
|
||||
searchParams: {
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ params, searchParams }) =>
|
||||
export const generateMetadata = async ({ params }: Args) => generateMeta({ config, params })
|
||||
|
||||
const Page: React.FC<Args> = ({ params, searchParams }) =>
|
||||
Document({
|
||||
config,
|
||||
params,
|
||||
searchParams,
|
||||
})
|
||||
|
||||
export default Page
|
||||
|
@ -1,11 +1,20 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import { DocumentLayout } from '@payloadcms/next/layouts/Document'
|
||||
import { DocumentLayout } from '@payloadcms/next/layouts/Document/index'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
export default async ({ children, params }: { children: React.ReactNode; params }) => (
|
||||
type Args = {
|
||||
children: React.ReactNode
|
||||
params: {
|
||||
global: string
|
||||
}
|
||||
}
|
||||
|
||||
const Layout: React.FC<Args> = async ({ children, params }) => (
|
||||
<DocumentLayout config={configPromise} globalSlug={params.global}>
|
||||
{children}
|
||||
</DocumentLayout>
|
||||
)
|
||||
|
||||
export default Layout
|
||||
|
@ -4,6 +4,14 @@ import { Dashboard, generateMetadata as generateMeta } from '@payloadcms/next/pa
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
searchParams: {
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
}
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
export default async ({ searchParams }) => Dashboard({ config, searchParams })
|
||||
const Page: React.FC<Args> = async ({ searchParams }) => Dashboard({ config, searchParams })
|
||||
|
||||
export default Page
|
||||
|
Loading…
Reference in New Issue
Block a user