Create author block
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias 2024-06-23 23:21:26 +02:00
parent fa48a192e3
commit 0a14bb39de
3 changed files with 16 additions and 3 deletions

View 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

View File

@ -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]

View File

@ -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) => {