This commit is contained in:
parent
fa48a192e3
commit
0a14bb39de
14
src/app/(payload)/blocks/author.ts
Normal file
14
src/app/(payload)/blocks/author.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import type { Block } from 'payload/types'
|
||||
|
||||
const Author: Block = {
|
||||
slug: 'Author',
|
||||
fields: [
|
||||
{
|
||||
name: 'author',
|
||||
type: 'relationship',
|
||||
relationTo: 'authors',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default Author
|
@ -1,4 +1,5 @@
|
||||
import RichText from '@payload/blocks/rich-text'
|
||||
import Author from '@payload/blocks/author'
|
||||
|
||||
// eslint-disable-next-line import/no-anonymous-default-export
|
||||
export default [RichText]
|
||||
export default [RichText, Author]
|
||||
|
@ -1,4 +1,3 @@
|
||||
import Paragraph from '@/app/(payload)/blocks/paragraph'
|
||||
import Author from './Author'
|
||||
import RichText from './RichText'
|
||||
|
||||
@ -10,7 +9,6 @@ export type AdditionalBlockProps = {
|
||||
const blockComponents = {
|
||||
Author: Author,
|
||||
RichText: RichText,
|
||||
Paragraph: Paragraph,
|
||||
}
|
||||
|
||||
const Blocks = ({ blocks, locale }: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user