dify/web/app/components/base/markdown-blocks/img.tsx
Wu Tianwei 75bbb616ea
refactor: replace react markdown with streamdown (#32971)
Co-authored-by: Stephen Zhou <hi@hyoban.cc>
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-03-10 17:02:37 +08:00

15 lines
491 B
TypeScript

/**
* @fileoverview Img component for rendering <img> tags in Markdown.
* Extracted from the main markdown renderer for modularity.
* Uses the ImageGallery component to display images.
*/
import { memo, useMemo } from 'react'
import ImageGallery from '@/app/components/base/image-gallery'
const Img = memo(({ src }: { src: string }) => {
const srcs = useMemo(() => [src], [src])
return <div className="markdown-img-wrapper"><ImageGallery srcs={srcs} /></div>
})
export default Img