mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-19 12:15:43 +00:00
32 lines
779 B
TypeScript
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);
|