style: 🎨 update Prettier config and format files
parent
93273f6fa9
commit
ab5cd05b55
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"singleQuote": true,
|
"singleQuote": false,
|
||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
"printWidth": 100,
|
"printWidth": 100,
|
||||||
"semi": false
|
"semi": true
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||||
import type { Metadata } from 'next'
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
import config from '@payload-config'
|
import config from "@payload-config";
|
||||||
/* 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 { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
import { NotFoundPage, generatePageMetadata } from "@payloadcms/next/views";
|
||||||
import { importMap } from '../importMap'
|
import { importMap } from "../importMap";
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: {
|
||||||
segments: string[]
|
segments: string[];
|
||||||
}
|
};
|
||||||
searchParams: {
|
searchParams: {
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[];
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
generatePageMetadata({ config, params, searchParams })
|
generatePageMetadata({ config, params, searchParams });
|
||||||
|
|
||||||
const NotFound = ({ params, searchParams }: Args) =>
|
const NotFound = ({ params, searchParams }: Args) =>
|
||||||
NotFoundPage({ config, params, searchParams, importMap })
|
NotFoundPage({ config, params, searchParams, importMap });
|
||||||
|
|
||||||
export default NotFound
|
export default NotFound;
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||||
import type { Metadata } from 'next'
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
import config from '@payload-config'
|
import config from "@payload-config";
|
||||||
/* 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, generatePageMetadata } from '@payloadcms/next/views'
|
import { RootPage, generatePageMetadata } from "@payloadcms/next/views";
|
||||||
import { importMap } from '../importMap'
|
import { importMap } from "../importMap";
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
params: {
|
params: {
|
||||||
segments: string[]
|
segments: string[];
|
||||||
}
|
};
|
||||||
searchParams: {
|
searchParams: {
|
||||||
[key: string]: string | string[]
|
[key: string]: string | string[];
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||||
generatePageMetadata({ config, params, searchParams })
|
generatePageMetadata({ config, params, searchParams });
|
||||||
|
|
||||||
const Page = ({ params, searchParams }: Args) =>
|
const Page = ({ params, searchParams }: Args) =>
|
||||||
RootPage({ config, params, searchParams, importMap })
|
RootPage({ config, params, searchParams, importMap });
|
||||||
|
|
||||||
export default Page
|
export default Page;
|
||||||
|
@ -1 +1 @@
|
|||||||
export const importMap = {}
|
export const importMap = {};
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* 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 re-written at any time. */
|
||||||
import config from '@payload-config'
|
import config from "@payload-config";
|
||||||
import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes'
|
import {
|
||||||
|
REST_DELETE,
|
||||||
|
REST_GET,
|
||||||
|
REST_OPTIONS,
|
||||||
|
REST_PATCH,
|
||||||
|
REST_POST,
|
||||||
|
} from "@payloadcms/next/routes";
|
||||||
|
|
||||||
export const GET = REST_GET(config)
|
export const GET = REST_GET(config);
|
||||||
export const POST = REST_POST(config)
|
export const POST = REST_POST(config);
|
||||||
export const DELETE = REST_DELETE(config)
|
export const DELETE = REST_DELETE(config);
|
||||||
export const PATCH = REST_PATCH(config)
|
export const PATCH = REST_PATCH(config);
|
||||||
export const OPTIONS = REST_OPTIONS(config)
|
export const OPTIONS = REST_OPTIONS(config);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* 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 re-written at any time. */
|
||||||
import config from '@payload-config'
|
import config from "@payload-config";
|
||||||
import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
|
import { GRAPHQL_PLAYGROUND_GET } from "@payloadcms/next/routes";
|
||||||
|
|
||||||
export const GET = GRAPHQL_PLAYGROUND_GET(config)
|
export const GET = GRAPHQL_PLAYGROUND_GET(config);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* 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 re-written at any time. */
|
||||||
import config from '@payload-config'
|
import config from "@payload-config";
|
||||||
import { GRAPHQL_POST } from '@payloadcms/next/routes'
|
import { GRAPHQL_POST } from "@payloadcms/next/routes";
|
||||||
|
|
||||||
export const POST = GRAPHQL_POST(config)
|
export const POST = GRAPHQL_POST(config);
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||||
import configPromise from '@payload-config'
|
import configPromise from "@payload-config";
|
||||||
import '@payloadcms/next/css'
|
import "@payloadcms/next/css";
|
||||||
import { RootLayout } from '@payloadcms/next/layouts'
|
import { RootLayout } from "@payloadcms/next/layouts";
|
||||||
/* 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 './custom.scss'
|
import "./custom.scss";
|
||||||
import { importMap } from './admin/importMap'
|
import { importMap } from "./admin/importMap";
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
children: React.ReactNode
|
children: React.ReactNode;
|
||||||
}
|
};
|
||||||
|
|
||||||
const Layout = ({ children }: Args) => (
|
const Layout = ({ children }: Args) => (
|
||||||
<RootLayout importMap={importMap} config={configPromise}>
|
<RootLayout importMap={importMap} config={configPromise}>
|
||||||
{children}
|
{children}
|
||||||
</RootLayout>
|
</RootLayout>
|
||||||
)
|
);
|
||||||
|
|
||||||
export default Layout
|
export default Layout;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import configPromise from '@payload-config'
|
import configPromise from "@payload-config";
|
||||||
import { getPayload } from 'payload'
|
import { getPayload } from "payload";
|
||||||
|
|
||||||
export const GET = async () => {
|
export const GET = async () => {
|
||||||
const payload = await getPayload({
|
const payload = await getPayload({
|
||||||
config: configPromise,
|
config: configPromise,
|
||||||
})
|
});
|
||||||
|
|
||||||
const data = await payload.find({
|
const data = await payload.find({
|
||||||
collection: 'users',
|
collection: "users",
|
||||||
})
|
});
|
||||||
|
|
||||||
return Response.json(data)
|
return Response.json(data);
|
||||||
}
|
};
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import type { CollectionConfig } from 'payload'
|
import type { CollectionConfig } from "payload";
|
||||||
|
|
||||||
export const Media: CollectionConfig = {
|
export const Media: CollectionConfig = {
|
||||||
slug: 'media',
|
slug: "media",
|
||||||
access: {
|
access: {
|
||||||
read: () => true,
|
read: () => true,
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'alt',
|
name: "alt",
|
||||||
type: 'text',
|
type: "text",
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
upload: true,
|
upload: true,
|
||||||
}
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import type { CollectionConfig } from 'payload'
|
import type { CollectionConfig } from "payload";
|
||||||
|
|
||||||
export const Users: CollectionConfig = {
|
export const Users: CollectionConfig = {
|
||||||
slug: 'users',
|
slug: "users",
|
||||||
admin: {
|
admin: {
|
||||||
useAsTitle: 'email',
|
useAsTitle: "email",
|
||||||
},
|
},
|
||||||
auth: true,
|
auth: true,
|
||||||
fields: [
|
fields: [
|
||||||
// Email added by default
|
// Email added by default
|
||||||
// Add more fields as needed
|
// Add more fields as needed
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
|
Loading…
Reference in New Issue