chore: migrate to payload / nextjs
This commit is contained in:
56
src/endpoints/seed/contact-page.ts
Normal file
56
src/endpoints/seed/contact-page.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import type { Form } from '@/payload-types'
|
||||
import { RequiredDataFromCollectionSlug } from 'payload'
|
||||
|
||||
type ContactArgs = {
|
||||
contactForm: Form
|
||||
}
|
||||
|
||||
export const contact: (args: ContactArgs) => RequiredDataFromCollectionSlug<'pages'> = ({
|
||||
contactForm,
|
||||
}) => {
|
||||
return {
|
||||
slug: 'contact',
|
||||
_status: 'published',
|
||||
hero: {
|
||||
type: 'none',
|
||||
},
|
||||
layout: [
|
||||
{
|
||||
blockType: 'formBlock',
|
||||
enableIntro: true,
|
||||
form: contactForm,
|
||||
introContent: {
|
||||
root: {
|
||||
type: 'root',
|
||||
children: [
|
||||
{
|
||||
type: 'heading',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Example contact form:',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
tag: 'h3',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
title: 'Contact',
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user