/* eslint-disable react/no-array-index-key */
import React from 'react';
import PropTypes from 'prop-types';
import List from './List';
import Quote from './Quote';
import Paragraph from './Paragraph';
import Heading from './Heading';
import Code from './Code';
import Link from './Link';
import BigEmoji from './BigEmoji';
import { useTheme } from '../../../theme';
const isBigEmoji = tokens => tokens.length === 1 && tokens[0].type === 'BIG_EMOJI';
const Body = ({ tokens, mentions }) => {
const { theme } = useTheme();
if (isBigEmoji(tokens)) {
return ;
}
return (
<>
{tokens.map((block, index) => {
switch (block.type) {
case 'UNORDERED_LIST':
return
;
case 'ORDERED_LIST':
return
;
case 'TASK':
return
;
case 'QUOTE':
return
;
case 'PARAGRAPH':
return ;
case 'CODE':
return
;
case 'LINK':
// eslint-disable-next-line jsx-a11y/anchor-is-valid
return ;
case 'HEADING':
return ;
default:
return null;
}
})}
>
);
};
Body.propTypes = {
tokens: PropTypes.array,
mentions: PropTypes.array
};
export default Body;