import { Link } from '@mui/material'; import type { AnchorHTMLAttributes, ComponentProps } from 'react'; import ReactMarkdown from 'react-markdown'; import { useNavigate } from 'react-router-dom'; const LinkRenderer = ({ href = '', children, }: AnchorHTMLAttributes) => { const navigate = useNavigate(); if (href.startsWith('/')) return navigate(href)}>{children}; return ( {children} ); }; export const Markdown = ({ components, ...props }: ComponentProps) => ( );