fix: add channel name when the text is bold (#5319)

* added changes in the Bold.tsx file for Channel Mention

Signed-off-by: bhandari <153hsb@gmail.com>

* added changes for strike and italic

Signed-off-by: bhandari <153hsb@gmail.com>

---------

Signed-off-by: bhandari <153hsb@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
This commit is contained in:
Devaansh Bhandari 2023-11-13 22:44:37 +05:30 committed by GitHub
parent 93c8409354
commit 5b335bdc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,8 @@ const Bold = ({ value }: IBoldProps) => (
return <Strike value={block.value} />; return <Strike value={block.value} />;
case 'ITALIC': case 'ITALIC':
return <Italic value={block.value} />; return <Italic value={block.value} />;
case 'MENTION_CHANNEL':
return <Plain value={`#${block.value.value}`} />;
default: default:
return null; return null;
} }

View File

@ -29,6 +29,8 @@ const Italic = ({ value }: IItalicProps) => (
return <Strike value={block.value} />; return <Strike value={block.value} />;
case 'BOLD': case 'BOLD':
return <Bold value={block.value} />; return <Bold value={block.value} />;
case 'MENTION_CHANNEL':
return <Plain value={`#${block.value.value}`} />;
default: default:
return null; return null;
} }

View File

@ -29,6 +29,8 @@ const Strike = ({ value }: IStrikeProps) => (
return <Bold value={block.value} />; return <Bold value={block.value} />;
case 'ITALIC': case 'ITALIC':
return <Italic value={block.value} />; return <Italic value={block.value} />;
case 'MENTION_CHANNEL':
return <Plain value={`#${block.value.value}`} />;
default: default:
return null; return null;
} }