From 417ea353a910a683d0efe8ae2180be5ab6df4e61 Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Mon, 27 Sep 2021 12:41:17 -0400 Subject: [PATCH] Fix new markdown and styles --- app/containers/markdown/new/Heading.tsx | 6 +++--- app/containers/markdown/new/InlineCode.tsx | 3 ++- app/containers/markdown/new/Quote.tsx | 16 +++++++--------- app/containers/message/Content.tsx | 1 + 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/containers/markdown/new/Heading.tsx b/app/containers/markdown/new/Heading.tsx index 09f1a7f0d..4ba4d27cf 100644 --- a/app/containers/markdown/new/Heading.tsx +++ b/app/containers/markdown/new/Heading.tsx @@ -16,16 +16,16 @@ const Heading: React.FC = ({ value, level }) => { const textStyle = styles[`heading${level}`]; return ( - <> + {value.map(block => { switch (block.type) { case 'PLAIN_TEXT': - return {block.value}; + return block.value; default: return null; } })} - + ); }; diff --git a/app/containers/markdown/new/InlineCode.tsx b/app/containers/markdown/new/InlineCode.tsx index ccec7c464..b2b64fa64 100644 --- a/app/containers/markdown/new/InlineCode.tsx +++ b/app/containers/markdown/new/InlineCode.tsx @@ -5,6 +5,7 @@ import { InlineCode as InlineCodeProps } from '@rocket.chat/message-parser'; import styles from '../styles'; import { themes } from '../../../constants/colors'; import { useTheme } from '../../../theme'; +import Plain from './Plain'; interface IInlineCodeProps { value: InlineCodeProps['value']; @@ -28,7 +29,7 @@ const InlineCode: React.FC = ({ value, style }) => { {(block => { switch (block.type) { case 'PLAIN_TEXT': - return block.value; + return ; default: return null; } diff --git a/app/containers/markdown/new/Quote.tsx b/app/containers/markdown/new/Quote.tsx index 5d0e45a56..bbc8cadf8 100644 --- a/app/containers/markdown/new/Quote.tsx +++ b/app/containers/markdown/new/Quote.tsx @@ -14,16 +14,14 @@ interface IQuoteProps { const Quote: React.FC = ({ value }) => { const { theme } = useTheme(); return ( - <> - - - - {value.map(item => ( - - ))} - + + + + {value.map(item => ( + + ))} - + ); }; diff --git a/app/containers/message/Content.tsx b/app/containers/message/Content.tsx index c90301471..3ef9c9a74 100644 --- a/app/containers/message/Content.tsx +++ b/app/containers/message/Content.tsx @@ -51,6 +51,7 @@ const Content = React.memo( // @ts-ignore