Files
pwap/pezkuwi-sdk-ui/packages/page-explorer/src/BlockInfo/Justifications.tsx
T
pezkuwichain 971df8edba Rebrand: Remove 3rd party chains, update domains to PezkuwiChain
- Remove all 3rd party parachain configurations from endpoints:
  - productionRelayPolkadot.ts: Keep only system parachains
  - productionRelayDicle.ts: Keep only system parachains
  - testingRelayZagros.ts: Keep only system parachains
  - testingRelayTeyrChain.ts: Keep only system parachains

- Update domain references:
  - polkadot.js.org → pezkuwichain.app
  - wiki.polkadot.network → wiki.pezkuwichain.io
  - dotapps.io → pezkuwichain.app
  - statement.polkadot.network → docs.pezkuwichain.io/statement
  - support.polkadot.network → docs.pezkuwichain.io

- Update repository references:
  - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap

- Rename system parachains to Pezkuwi ecosystem:
  - PolkadotAssetHub → PezkuwiAssetHub
  - polkadotBridgeHub → pezkuwiBridgeHub
  - polkadotCollectives → pezkuwiCollectives
  - polkadotCoretime → pezkuwiCoretime
  - polkadotPeople → pezkuwiPeople

- Update network name in claims utility:
  - Polkadot → Pezkuwi
2026-01-09 03:08:11 +03:00

71 lines
1.8 KiB
TypeScript

// Copyright 2017-2026 @pezkuwi/app-explorer authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Option, Tuple } from '@pezkuwi/types';
import type { Justifications } from '@pezkuwi/types/interfaces';
import type { Codec, TypeDef } from '@pezkuwi/types/types';
import React, { useRef } from 'react';
import { Expander, Table } from '@pezkuwi/react-components';
import Params from '@pezkuwi/react-params';
import { getTypeDef } from '@pezkuwi/types/create';
import { useTranslation } from '../translate.js';
interface Props {
value: Option<Justifications>;
}
function formatTuple (tuple: Tuple): React.ReactNode {
const params = tuple.Types.map((type): { type: TypeDef } => ({
type: getTypeDef(type)
}));
const values = tuple.toArray().map((value): { isValid: boolean; value: Codec } => ({
isValid: true,
value
}));
return (
<Params
isDisabled
params={params}
values={values}
withExpander
/>
);
}
function JustificationList ({ value }: Props): React.ReactElement<Props> | null {
const { t } = useTranslation();
const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([
[t('justifications'), 'start']
]);
const justifications = value.unwrapOr(null);
if (!justifications) {
return null;
}
return (
<Table
empty={t('No justifications available')}
header={headerRef.current}
>
{justifications?.map((justification, index) => (
<tr key={`justification:${index}`}>
<td className='overflow'>
<Expander summary={justification[0].toString()}>
{formatTuple(justification as unknown as Tuple)}
</Expander>
</td>
</tr>
))}
</Table>
);
}
export default React.memo(JustificationList);