'use client' import { FC, useState } from 'react' import Image from 'next/image' import Link from 'next/link' import { cn } from '@/lib/utils' import type { UnorderedListProps, OrderedListProps, EmphasizedTextProps, ItalicTextProps, StrongTextProps, BoldTextProps, DeletedTextProps, UnderlinedTextProps, HorizontalRuleProps, BlockquoteProps, AnchorLinkProps, HeadingProps, ImgProps, ParagraphProps, TableHeaderCellProps, TableProps, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, PreparedTextProps } from './types' import { HEADING_SIZES } from '../Heading/constants' import { PARAGRAPH_SIZES } from '../Paragraph/constants' const filterProps = (props: object) => { const newProps = { ...props } if ('node' in newProps) { delete newProps.node } return newProps } const UnorderedList = ({ className, ...props }: UnorderedListProps) => (
{children}
)
}
const Blockquote = ({ className, ...props }: BlockquoteProps) => (
)
const AnchorLink = ({ className, ...props }: AnchorLinkProps) => (
)
const Heading1 = ({ className, ...props }: HeadingProps) => (
)
const Heading2 = ({ className, ...props }: HeadingProps) => (
)
const Heading3 = ({ className, ...props }: HeadingProps) => (
)
const Heading4 = ({ className, ...props }: HeadingProps) => (
)
const Heading5 = ({ className, ...props }: HeadingProps) => (
)
const Heading6 = ({ className, ...props }: HeadingProps) => (
)
const Img = ({ src, alt }: ImgProps) => {
const [error, setError] = useState(false)
if (!src) return null
return (