diff --git a/frontend/components/markdown-wrapper.tsx b/frontend/components/markdown-wrapper.tsx deleted file mode 100644 index 98828f10..00000000 --- a/frontend/components/markdown-wrapper.tsx +++ /dev/null @@ -1,43 +0,0 @@ -"use client"; - -import React from "react"; - -// Type-safe wrapper that bypasses react-markdown typing issues -interface MarkdownWrapperProps { - children: string; - remarkPlugins?: any[]; - rehypePlugins?: any[]; - linkTarget?: string; - components?: any; -} - -const MarkdownWrapper: React.FC = ({ - children, - remarkPlugins, - rehypePlugins, - linkTarget, - components -}) => { - const [MarkdownComponent, setMarkdownComponent] = React.useState(null); - - React.useEffect(() => { - // Dynamically import react-markdown at runtime to avoid build-time type issues - import("react-markdown").then((mod) => { - setMarkdownComponent(() => mod.default); - }); - }, []); - - if (!MarkdownComponent) { - return
Loading markdown...
; - } - - return React.createElement(MarkdownComponent, { - remarkPlugins, - rehypePlugins, - linkTarget, - components, - children, - }); -}; - -export default MarkdownWrapper; \ No newline at end of file diff --git a/frontend/types/jsx.d.ts b/frontend/types/jsx.d.ts deleted file mode 100644 index 18ff18af..00000000 --- a/frontend/types/jsx.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; - -declare global { - namespace JSX { - interface IntrinsicElements { - [elemName: string]: any; - } - } -} - -declare module 'react-markdown' { - interface ReactMarkdownProps { - children: string; - remarkPlugins?: any[]; - rehypePlugins?: any[]; - linkTarget?: string; - components?: any; - } - - const ReactMarkdown: React.FC; - export default ReactMarkdown; -} \ No newline at end of file