import React from 'react'; import { MarkdownAST } from '@rocket.chat/message-parser'; import Quote from './Quote'; import Paragraph from './Paragraph'; import Heading from './Heading'; import Code from './Code'; import BigEmoji from './BigEmoji'; import OrderedList from './OrderedList'; import UnorderedList from './UnorderedList'; import { UserMention } from '../../message/interfaces'; import TaskList from './TaskList'; import MarkdownContext from './MarkdownContext'; interface IBodyProps { tokens: MarkdownAST; mentions: UserMention[]; channels: { name: string; _id: number; }[]; getCustomEmoji?: Function; onLinkPress?: Function; navToRoomInfo: Function; useRealName: boolean; username: string; baseUrl: string; } const Body = ({ tokens, mentions, channels, useRealName, username, navToRoomInfo, getCustomEmoji, baseUrl, onLinkPress }: IBodyProps): JSX.Element => ( {tokens.map(block => { switch (block.type) { case 'BIG_EMOJI': return ; case 'UNORDERED_LIST': return ; case 'ORDERED_LIST': return ; case 'TASKS': return ; case 'QUOTE': return ; case 'PARAGRAPH': return ; case 'CODE': return ; case 'HEADING': return ; default: return null; } })} ); export default Body;