import cn from "classnames"; import DotCmsImage from "./dotcms-image"; import Link from "next/link"; export const Bold = ({ children }) => {children}; export const Italic = ({ children }) => {children}; export const Strike = ({ children }) => {children}; export const Underline = ({ children }) => {children}; export const DotLink = ({ attrs: { href, target }, children }) => { const regEx = /https?:\/\//; return regEx.test(href) ? ( {children} ) : ( {children} ); }; const nodeMarks = { link: DotLink, bold: Bold, underline: Underline, italic: Italic, strike: Strike, }; export const TextNode = (props) => { const { marks = [], text } = props; const mark = marks[0] || { type: "", attrs: {} }; const newProps = { ...props, marks: marks.slice(1) }; const Component = nodeMarks[mark?.type]; if (!Component) { return text; } return ( ); }; export const DotImage = ({ attrs: { textAlign, data } }) => { const { asset, title } = data; const [imgTitle] = title.split("."); return ( ); }; export const ListItem = ({ children }) => { return
  • {children}
  • ; }; export const OrderedList = ({ children }) => { return
      {children}
    ; }; export const Paragraph = ({ children }) => { return

    {children}

    ; }; export const BulletList = ({ children }) => { return ; }; export const Heading = ({ level, children }) => { const Tag = `h${level}` as keyof JSX.IntrinsicElements; return {children}; }; export const BlockQuote = ({ children }) => { return
    {children}
    ; }; export const CodeBlock = ({ language, children }) => { return (
          {children}
        
    ); };