import { Suspense } from "react"; import remarkGfm from "remark-gfm"; import { compileMDX } from "next-mdx-remote/rsc"; import { Skeleton } from "@/components/ui/skeleton"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; interface ProblemDescriptionProps { mdxSource: string; } export async function ProblemDescription({ mdxSource }: ProblemDescriptionProps) { try { const { content } = await compileMDX({ source: mdxSource, options: { mdxOptions: { remarkPlugins: [remarkGfm], }, }, }); return ( }>
{content}
); } catch (error) { console.error("Error compiling MDX:", error); return ; } }