components/CMS/PortableText/SimpleBlockContent.tsx
import BlockContent from '@sanity/block-content-to-react'
import { TextBlock } from 'PortableText'
import serializers from './serializers'
interface ISimpleBlockContentProps {
blocks: TextBlock | TextBlock[]
}
const SimpleBlockContent: React.FC<ISimpleBlockContentProps> = (props) => {
const { blocks } = props
return (
<BlockContent
blocks={blocks}
serializers={serializers}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
projectId={process.env.NEXT_PUBLIC_SANITY_PROJECT_ID!}
dataset="production"
/>
)
}
export default SimpleBlockContent