import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import { Hashtag, ImagePreview, LinkPreview, MentionNote, MentionUser, VideoPreview, } from '@shared/notes'; import { RichContent } from '@utils/types'; export function NoteContent({ content, long }: { content: RichContent; long?: boolean }) { if (long) { return ( {content as unknown as string} ); } return ( <> { const key = children[0] as string; if (key.startsWith('pub') && key.length > 50 && key.length < 100) return ; if (key.startsWith('tag')) return ; }, }} > {content?.parsed} {content?.images?.length > 0 && } {content?.videos?.length > 0 && } {content?.links?.length > 0 && } {content?.notes?.length > 0 && content?.notes.map((note: string) => )} ); }