feat: 类型帖互动、积分经济与发帖体验
补齐问答采纳/重开、投票匿名与有票禁编、悬赏过期退回、抽奖回帖开奖,并接入积分账本与发帖附件可见性。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
frontend/components/MarkdownBody.tsx
Normal file
20
frontend/components/MarkdownBody.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user