Files
pezkuwi-apps/packages/page-whitelist/src/Hashes/Summary.tsx
T

32 lines
779 B
TypeScript

// Copyright 2017-2026 @pezkuwi/app-whitelist authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import { CardSummary, SummaryBox } from '@pezkuwi/react-components';
import { formatNumber } from '@pezkuwi/util';
import { useTranslation } from '../translate.js';
interface Props {
className?: string;
hashes?: string[];
}
function Summary ({ className, hashes }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
return (
<SummaryBox className={className}>
<CardSummary label={t('hashes')}>
{hashes === undefined
? <span className='--tmp'>99</span>
: formatNumber(hashes.length)
}
</CardSummary>
</SummaryBox>
);
}
export default React.memo(Summary);