mirror of
https://github.com/langgenius/dify.git
synced 2026-03-27 23:30:54 +08:00
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>
15 lines
491 B
TypeScript
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
|