Files
dify/web/app/components/plugins/card/base/download-count.tsx
2026-02-09 15:44:32 +08:00

27 lines
569 B
TypeScript

import { useTranslation } from '#i18n'
import * as React from 'react'
import { formatNumber } from '@/utils/format'
type Props = {
downloadCount: number
}
const DownloadCountComponent = ({
downloadCount,
}: Props) => {
const { t } = useTranslation('plugin')
return (
<div className="system-xs-regular text-text-tertiary">
{formatNumber(downloadCount)}
{' '}
{t('marketplace.installs')}
</div>
)
}
// Memoize to prevent unnecessary re-renders
const DownloadCount = React.memo(DownloadCountComponent)
export default DownloadCount