dify/web/app/components/base/markdown-blocks/img.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

19 lines
513 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