mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 16:38:04 +08:00
27 lines
569 B
TypeScript
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
|