diff --git a/ny-portal/src/app/(payload)/admin/importMap.js b/ny-portal/src/app/(payload)/admin/importMap.js index 1c51047b852..ea6e6bba6fe 100644 --- a/ny-portal/src/app/(payload)/admin/importMap.js +++ b/ny-portal/src/app/(payload)/admin/importMap.js @@ -1,3 +1,4 @@ +import { SlugComponent as SlugComponent_92cc057d0a2abb4f6cf0307edf59f986 } from '@/fields/slug/SlugComponent' import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' @@ -23,6 +24,7 @@ import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0 import { default as default_6b73bc0444f03fe7497cdc21a73ec1c0 } from '@/fields/code-example/CodeExampleInput' export const importMap = { + "@/fields/slug/SlugComponent#SlugComponent": SlugComponent_92cc057d0a2abb4f6cf0307edf59f986, "@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e, "@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e, "@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, diff --git a/ny-portal/src/collections/ComponentPages/index.ts b/ny-portal/src/collections/ComponentPages/index.ts index a9a570341cc..9520ec3497d 100644 --- a/ny-portal/src/collections/ComponentPages/index.ts +++ b/ny-portal/src/collections/ComponentPages/index.ts @@ -1,5 +1,6 @@ -import { CollectionBeforeReadHook, CollectionConfig } from "payload"; +import { CollectionConfig } from "payload"; import { CodeExampleField } from "@/fields/code-example"; +import { slugField } from "@/fields/slug"; export const ComponentPages: CollectionConfig = { slug: "component-page", @@ -7,12 +8,7 @@ export const ComponentPages: CollectionConfig = { useAsTitle: "title", }, fields: [ - { - name: "slug", - type: "text", - label: "URL-segment", - required: true, - }, + ...slugField(), { name: "title", type: "text",