补齐问答采纳/重开、投票匿名与有票禁编、悬赏过期退回、抽奖回帖开奖,并接入积分账本与发帖附件可见性。 Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
import ReactMarkdown, { type Components } from "react-markdown";
|
|
|
|
type MarkdownBodyProps = {
|
|
content: string;
|
|
className?: string;
|
|
components?: Components;
|
|
};
|
|
|
|
/** 站点统一 Markdown 渲染:详情页 / 发帖预览共用 prose-content */
|
|
export default function MarkdownBody({
|
|
content,
|
|
className = "prose-content",
|
|
components,
|
|
}: MarkdownBodyProps) {
|
|
return (
|
|
<div className={className}>
|
|
<ReactMarkdown components={components}>{content || ""}</ReactMarkdown>
|
|
</div>
|
|
);
|
|
}
|