Skip to content

Commit

Permalink
add support for images via markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Jan 24, 2025
1 parent 7721946 commit aa93838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { init } from 'emoji-mart';
import Linkify from 'react-linkify';
import { SecureLink } from 'react-secure-link';
import styles from './Chat.module.css';
import Markdown from 'react-markdown';

import {
formatTimestamp,
Expand Down Expand Up @@ -453,6 +454,7 @@ const ChatMessage = ({
{!cmd && msg}
</Comment.Text>
</Linkify>
{msg.startsWith('![') && <Markdown>{msg}</Markdown>}
<div className={classes.commentMenu}>
<Icon
onClick={(e: MouseEvent) => {
Expand Down

0 comments on commit aa93838

Please sign in to comment.