import { cn } from '@langgenius/dify-ui/cn' import * as React from 'react' import DownloadCount from './base/download-count' type Props = Readonly<{ downloadCount?: number tags: string[] variant?: 'default' | 'marketplace' }> const CardMoreInfoComponent = ({ downloadCount, tags, variant = 'default' }: Props) => { if (variant === 'marketplace') { return (
{tags.map((tag) => (
{tag}
))}
) } return (
{downloadCount !== undefined && } {downloadCount !== undefined && tags && tags.length > 0 && (
ยท
)} {tags && tags.length > 0 && ( <>
{tags.map((tag) => (
# {tag}
))}
)}
) } // Memoize to prevent unnecessary re-renders when tags array hasn't changed const CardMoreInfo = React.memo(CardMoreInfoComponent) export default CardMoreInfo