import Link from 'next/link'; import React, { memo } from 'react'; import { Streamdown, type StreamdownProps } from 'streamdown'; type Components = StreamdownProps['components']; const components: Partial = { a: ({ node, children, ...props }) => { return ( // @ts-expect-error {children} ); }, }; const NonMemoizedMarkdown = ({ children }: { children: string }) => ( {children} ); export const Markdown = memo( NonMemoizedMarkdown, (prevProps, nextProps) => prevProps.children === nextProps.children, );