chore: types app exports

This commit is contained in:
James 2024-03-01 11:58:11 -05:00
parent d6fa223598
commit 6821ceccec
6 changed files with 55 additions and 15 deletions

View File

@ -1,8 +1,14 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import { Account, generateMetadata as generateMeta } from '@payloadcms/next/pages/Account' import { Account, generateMetadata as generateMeta } from '@payloadcms/next/pages/Account/index'
import config from '@payload-config' import config from '@payload-config'
export const generateMetadata = async () => generateMeta({ config }) export const generateMetadata = async () => generateMeta({ config })
export default ({ searchParams }) => Account({ config, searchParams }) type Args = {
searchParams: { [key: string]: string | string[] };
}
const Page: React.FC<Args> = ({ searchParams }) => Account({ config, searchParams })
export default Page

View File

@ -1,11 +1,20 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import React from 'react' import React from 'react'
import { DocumentLayout } from '@payloadcms/next/layouts/Document' import { DocumentLayout } from '@payloadcms/next/layouts/Document/index'
import configPromise from '@payload-config' import configPromise from '@payload-config'
export default async ({ children, params }: { children: React.ReactNode; params }) => ( type Args = {
children: React.ReactNode
params: {
collection: string
}
}
const Layout: React.FC<Args> = async ({ children, params }: Args) => (
<DocumentLayout config={configPromise} collectionSlug={params.collection}> <DocumentLayout config={configPromise} collectionSlug={params.collection}>
{children} {children}
</DocumentLayout> </DocumentLayout>
) )
export default Layout

View File

@ -1,13 +1,24 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* 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' import config from '@payload-config'
export const generateMetadata = async ({ params }) => generateMeta({ config, params }) type Args = {
params: {
collection: string
global: 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({ Document({
params, params,
searchParams, searchParams,
config, config,
}) })
export default Page

View File

@ -1,14 +1,24 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import { ListView, generateMetadata as generateMeta } from '@payloadcms/next/pages/List' import { ListView, generateMetadata as generateMeta } from '@payloadcms/next/pages/List/index'
import config from '@payload-config' import config from '@payload-config'
export const generateMetadata = async ({ params }) => generateMeta({ config, params }) type Args = {
params: {
collection: string
[key: string]: string | 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 }) =>
ListView({ ListView({
collectionSlug: params.collection, collectionSlug: params.collection,
searchParams, searchParams,
config, config,
route: `/collections/${params.collection + (params.segments?.length ? `/${params.segments.join('/')}` : '')}`, route: `/collections/${params.collection + (Array.isArray(params.segments) && params.segments?.length ? `/${params.segments.join('/')}` : '')}`,
}) })
export default Page

View File

@ -1,9 +1,11 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import React from 'react' import React from 'react'
import { RootLayout } from '@payloadcms/next/layouts/Root' import { RootLayout } from '@payloadcms/next/layouts/Root/index'
import configPromise from '@payload-config' import configPromise from '@payload-config'
export default async ({ children }: { children: React.ReactNode }) => ( const Layout = async ({ children }: { children: React.ReactNode }) => (
<RootLayout config={configPromise}>{children}</RootLayout> <RootLayout config={configPromise}>{children}</RootLayout>
) )
export default Layout

View File

@ -1,6 +1,8 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import { RootPage } from '@payloadcms/next/pages/Root' import { RootPage } from '@payloadcms/next/pages/Root/index'
import config from '@payload-config' import config from '@payload-config'
export default () => RootPage({ config }) const Page = () => RootPage({ config })
export default Page