mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-20 04:41:07 +00:00
d21bfb1320
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
// Copyright 2017-2025 @pezkuwi/app-whitelist authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { SubmittableExtrinsicFunction } from '@pezkuwi/api/types';
|
|
|
|
import React, { useRef } from 'react';
|
|
|
|
import { Table } from '@pezkuwi/react-components';
|
|
|
|
import { useTranslation } from '../translate.js';
|
|
import useHashes from '../useHashes.js';
|
|
import Details from './Details.js';
|
|
import Summary from './Summary.js';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
defaultPropose?: SubmittableExtrinsicFunction<'promise'>;
|
|
filter?: (section: string, method?: string) => boolean;
|
|
}
|
|
|
|
function Hashes ({ className }: Props): React.ReactElement<Props> {
|
|
const { t } = useTranslation();
|
|
const hashes = useHashes();
|
|
|
|
const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([
|
|
[t('calls'), 'start'],
|
|
[undefined, 'all'],
|
|
[undefined, 'media--1300']
|
|
]);
|
|
|
|
return (
|
|
<div className={className}>
|
|
<Summary hashes={hashes} />
|
|
<Table
|
|
className={className}
|
|
empty={hashes && t('No call hashes found')}
|
|
header={headerRef.current}
|
|
>
|
|
{hashes?.map((h) => (
|
|
<Details
|
|
key={h}
|
|
value={h}
|
|
/>
|
|
))}
|
|
</Table>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Hashes);
|