chore: bumps packages, migrates to flattened admin
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { Account, generateMetadata as generateMeta } from '@payloadcms/next/pages/Account/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
export const generateMetadata = async () => generateMeta({ config })
|
||||
|
||||
type Args = {
|
||||
searchParams: { [key: string]: string | string[] };
|
||||
}
|
||||
|
||||
const Page: React.FC<Args> = ({ searchParams }) => Account({ config, searchParams })
|
||||
|
||||
export default Page
|
@ -1,20 +0,0 @@
|
||||
/* 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/index'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
children: React.ReactNode
|
||||
params: {
|
||||
collection: string
|
||||
}
|
||||
}
|
||||
|
||||
const Layout: React.FC<Args> = async ({ children, params }: Args) => (
|
||||
<DocumentLayout config={configPromise} collectionSlug={params.collection}>
|
||||
{children}
|
||||
</DocumentLayout>
|
||||
)
|
||||
|
||||
export default Layout
|
@ -1,24 +0,0 @@
|
||||
/* 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/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
params: {
|
||||
collection: string
|
||||
global: string
|
||||
segments: string[]
|
||||
}
|
||||
searchParams: { [key: string]: string | string[] }
|
||||
}
|
||||
|
||||
export const generateMetadata = async ({ params }: Args) => generateMeta({ config, params })
|
||||
|
||||
const Page: React.FC<Args> = ({ params, searchParams }) =>
|
||||
Document({
|
||||
params,
|
||||
searchParams,
|
||||
config,
|
||||
})
|
||||
|
||||
export default Page
|
@ -1,24 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { ListView, generateMetadata as generateMeta } from '@payloadcms/next/pages/List/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
params: {
|
||||
collection: string
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
searchParams: { [key: string]: string | string[] }
|
||||
}
|
||||
|
||||
export const generateMetadata = async ({ params }: Args) => generateMeta({ config, params })
|
||||
|
||||
const Page: React.FC<Args> = ({ params, searchParams }) =>
|
||||
ListView({
|
||||
collectionSlug: params.collection,
|
||||
searchParams,
|
||||
config,
|
||||
route: `/collections/${params.collection + (Array.isArray(params.segments) && params.segments?.length ? `/${params.segments.join('/')}` : '')}`,
|
||||
})
|
||||
|
||||
export default Page
|
@ -1,26 +0,0 @@
|
||||
/* 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/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
params: {
|
||||
global?: string
|
||||
collection?: string
|
||||
segments: string[]
|
||||
}
|
||||
searchParams: {
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
}
|
||||
|
||||
export const generateMetadata = async ({ params }: Args) => generateMeta({ config, params })
|
||||
|
||||
const Page: React.FC<Args> = ({ params, searchParams }) =>
|
||||
Document({
|
||||
config,
|
||||
params,
|
||||
searchParams,
|
||||
})
|
||||
|
||||
export default Page
|
@ -1,20 +0,0 @@
|
||||
/* 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/index'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
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
|
@ -1,11 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {AdminLayout} from '@payloadcms/next/layouts/Admin/index'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
const Layout = async ({ children }: { children: React.ReactNode }) => (
|
||||
<AdminLayout config={configPromise}>{children}</AdminLayout>
|
||||
)
|
||||
|
||||
export default Layout
|
@ -1,17 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { Dashboard, generateMetadata as generateMeta } from '@payloadcms/next/pages/Dashboard/index'
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
searchParams: {
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
}
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page: React.FC<Args> = async ({ searchParams }) => Dashboard({ config, searchParams })
|
||||
|
||||
export default Page
|
17
src/app/(payload)/admin/[[...segments]]/page.tsx
Normal file
17
src/app/(payload)/admin/[[...segments]]/page.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
import config from '@payload-config'
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { RootPage } from '@payloadcms/next/views/Root/index'
|
||||
|
||||
type Args = {
|
||||
params: {
|
||||
segments: string[]
|
||||
}
|
||||
searchParams: {
|
||||
[key: string]: string | string[]
|
||||
}
|
||||
}
|
||||
|
||||
const Page = ({ params, searchParams }: Args) => RootPage({ config, params, searchParams })
|
||||
|
||||
export default Page
|
@ -1,15 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
CreateFirstUser,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/CreateFirstUser/index";
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page = async () => <CreateFirstUser config={config} />;
|
||||
|
||||
export default Page;
|
@ -1,15 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
ForgotPassword,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/ForgotPassword/index";
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page = async () => <ForgotPassword config={config} />;
|
||||
|
||||
export default Page;
|
@ -1,21 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
Login,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/Login/index";
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
type Args = {
|
||||
searchParams: { [key: string]: string | string[] };
|
||||
};
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page = async ({ searchParams }: Args) => (
|
||||
<Login config={config} searchParams={searchParams} />
|
||||
);
|
||||
|
||||
export default Page;
|
@ -1,22 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
Logout,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/Logout/index";
|
||||
import { Metadata } from "next";
|
||||
import config from "@payload-config";
|
||||
|
||||
type Args = {
|
||||
searchParams: { [key: string]: string | string[] };
|
||||
};
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> =>
|
||||
generateMeta({ config });
|
||||
|
||||
const Page = async ({ searchParams }: Args) => (
|
||||
<Logout config={config} searchParams={searchParams} inactivity />
|
||||
);
|
||||
|
||||
export default Page;
|
@ -1,21 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
Logout,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/Logout/index";
|
||||
import { Metadata } from "next";
|
||||
import config from "@payload-config";
|
||||
|
||||
type Args = {
|
||||
searchParams: { [key: string]: string | string[] };
|
||||
};
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page = async ({ searchParams }: Args) => (
|
||||
<Logout config={config} searchParams={searchParams} />
|
||||
);
|
||||
|
||||
export default Page;
|
@ -1,22 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
ResetPassword,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/ResetPassword/index";
|
||||
import { Metadata } from "next";
|
||||
import config from "@payload-config";
|
||||
|
||||
type Args = {
|
||||
params: { [key: string]: string };
|
||||
};
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> =>
|
||||
generateMeta({ config });
|
||||
|
||||
const Page = async ({ params }: Args) => (
|
||||
<ResetPassword config={config} token={params.token} />
|
||||
);
|
||||
|
||||
export default Page;
|
@ -1,15 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
Unauthorized,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/Unauthorized/index";
|
||||
import { Metadata } from 'next'
|
||||
import config from '@payload-config'
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => generateMeta({ config })
|
||||
|
||||
const Page = async () => <Unauthorized config={config} />;
|
||||
|
||||
export default Page;
|
@ -1,22 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import {
|
||||
Verify,
|
||||
generateMetadata as generateMeta,
|
||||
} from "@payloadcms/next/pages/Verify/index";
|
||||
import { Metadata } from "next";
|
||||
import config from "@payload-config";
|
||||
|
||||
type Args = {
|
||||
params: { [key: string]: string };
|
||||
};
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> =>
|
||||
generateMeta({ config });
|
||||
|
||||
const Page = async ({ params }: Args) => (
|
||||
<Verify config={config} token={params.token} />
|
||||
);
|
||||
|
||||
export default Page;
|
@ -1,7 +1,7 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY it because it could be re-written at any time. */
|
||||
import config from '@payload-config'
|
||||
import { REST_GET, REST_DELETE, REST_PATCH, REST_POST } from '@payloadcms/next/routes'
|
||||
import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes'
|
||||
|
||||
export const GET = REST_GET(config)
|
||||
export const POST = REST_POST(config)
|
||||
|
0
src/app/(payload)/custom.scss
Normal file
0
src/app/(payload)/custom.scss
Normal file
@ -1,11 +1,15 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
import configPromise from '@payload-config'
|
||||
import { RootLayout } from '@payloadcms/next/layouts/Root/index'
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import React from 'react'
|
||||
import { RootLayout } from '@payloadcms/next/layouts/Root/index'
|
||||
import configPromise from '@payload-config'
|
||||
|
||||
const Layout = async ({ children }: { children: React.ReactNode }) => (
|
||||
<RootLayout config={configPromise}>{children}</RootLayout>
|
||||
)
|
||||
import './custom.scss'
|
||||
|
||||
type Args = {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const Layout = ({ children }: Args) => <RootLayout config={configPromise}>{children}</RootLayout>
|
||||
|
||||
export default Layout
|
||||
|
@ -1,8 +0,0 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import { RootPage } from '@payloadcms/next/pages/Root/index'
|
||||
import config from '@payload-config'
|
||||
|
||||
const Page = () => RootPage({ config })
|
||||
|
||||
export default Page
|
@ -1,9 +1,4 @@
|
||||
export const GET = async () => {
|
||||
console.log('1')
|
||||
console.log('1')
|
||||
console.log('1')
|
||||
console.log('1')
|
||||
console.log('1')
|
||||
export const GET = () => {
|
||||
return Response.json({
|
||||
hello: 'elliot',
|
||||
})
|
||||
|
Reference in New Issue
Block a user