chore: properly types cell components (#5474)

This commit is contained in:
Jacob Fletcher
2024-03-26 12:08:33 -04:00
committed by GitHub
parent 9c7e7ed8d4
commit 20b4585666
24 changed files with 93 additions and 67 deletions

View File

@@ -1,9 +1,9 @@
'use client'
import type { CellComponentProps } from 'payload/types'
import type { DefaultCellComponentProps } from 'payload/types'
import React from 'react'
export const RichTextCell: React.FC<CellComponentProps<any[]>> = ({ cellData }) => {
export const RichTextCell: React.FC<DefaultCellComponentProps<any[]>> = ({ cellData }) => {
const flattenedText = cellData?.map((i) => i?.children?.map((c) => c.text)).join(' ')
// Limiting the number of characters shown is done in a CSS rule