import { memo } from "react"; import { cn } from "@/lib/utils"; import { MemoMarkdownRenderer } from "./MemoMarkdownRenderer"; import { useResolvedMentionUsernames } from "./MentionResolutionContext"; import type { MemoContentProps } from "./types"; // Stateless markdown renderer. Truncation is not this component's concern — compact cards // are bounded by ClampedSection around the whole memo body; `compact` here only informs // the renderer (e.g. footnote links navigate to the detail page instead of scrolling, // since a collapsed card may hide the target). const MemoContent = (props: MemoContentProps) => { const { className, contentClassName, content, onClick, onDoubleClick } = props; const resolvedMentionUsernames = useResolvedMentionUsernames(content); return (