mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-28 18:00:59 -05:00
fix: type errors with markdown content
This commit is contained in:
parent
4f3f6e26cf
commit
e3a526e2d7
4 changed files with 30 additions and 21 deletions
|
@ -159,7 +159,8 @@ const Message = observer(
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{replacement ?? <Markdown content={content} />}
|
{replacement ??
|
||||||
|
(content && <Markdown content={content} />)}
|
||||||
{!queued && <InviteList message={message} />}
|
{!queued && <InviteList message={message} />}
|
||||||
{queued?.error && (
|
{queued?.error && (
|
||||||
<Category>
|
<Category>
|
||||||
|
|
|
@ -221,13 +221,15 @@ export const MessageReply = observer(
|
||||||
</em>
|
</em>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Markdown
|
{message.content && (
|
||||||
disallowBigEmoji
|
<Markdown
|
||||||
content={message.content?.replace(
|
disallowBigEmoji
|
||||||
/\n/g,
|
content={message.content.replace(
|
||||||
" ",
|
/\n/g,
|
||||||
)}
|
" ",
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -185,13 +185,15 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||||
hideInfo
|
hideInfo
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Markdown
|
message.content && (
|
||||||
disallowBigEmoji
|
<Markdown
|
||||||
content={message.content?.replace(
|
disallowBigEmoji
|
||||||
/\n/g,
|
content={message.content.replace(
|
||||||
" ",
|
/\n/g,
|
||||||
)}
|
" ",
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -322,13 +322,17 @@ export const UserProfile = observer(
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{profile?.content && (
|
{profile?.content && (
|
||||||
<div className={styles.category}>
|
<>
|
||||||
<Text id="app.special.popovers.user_profile.sub.information" />
|
<div className={styles.category}>
|
||||||
</div>
|
<Text id="app.special.popovers.user_profile.sub.information" />
|
||||||
|
</div>
|
||||||
|
<div className={styles.markdown}>
|
||||||
|
<Markdown
|
||||||
|
content={profile.content}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<div className={styles.markdown}>
|
|
||||||
<Markdown content={profile?.content} />
|
|
||||||
</div>
|
|
||||||
{/*<div className={styles.category}><Text id="app.special.popovers.user_profile.sub.connections" /></div>*/}
|
{/*<div className={styles.category}><Text id="app.special.popovers.user_profile.sub.connections" /></div>*/}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Reference in a new issue