Files
dify/web/app/components/plugins/card/base/download-count.tsx
2026-01-26 11:24:44 +00:00

23 lines
555 B
TypeScript

import * as React from 'react'
import { formatNumber } from '@/utils/format'
type Props = {
downloadCount: number
}
const DownloadCountComponent = ({
downloadCount,
}: Props) => {
return (
<div className="flex items-center space-x-1 text-text-tertiary">
<span className="i-ri-install-line h-3 w-3 shrink-0" />
<div className="system-xs-regular">{formatNumber(downloadCount)}</div>
</div>
)
}
// Memoize to prevent unnecessary re-renders
const DownloadCount = React.memo(DownloadCountComponent)
export default DownloadCount