mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-17 02:01:09 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
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
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Copyright 2017-2025 @pezkuwi/app-referenda authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { useBestNumberRelay, useStakingAsyncApis } from '@pezkuwi/react-hooks';
|
||||
import { BlockToTime } from '@pezkuwi/react-query';
|
||||
import { formatNumber } from '@pezkuwi/util';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
label: string;
|
||||
when: BN | null;
|
||||
}
|
||||
|
||||
function RefEnd ({ className = '', label, when }: Props): React.ReactElement<Props> {
|
||||
const bestNumber = useBestNumberRelay();
|
||||
const { isStakingAsync, rcApi } = useStakingAsyncApis();
|
||||
|
||||
return (
|
||||
<td className={`${className} number`}>
|
||||
{bestNumber && when && (
|
||||
<>
|
||||
<div>{label}</div>
|
||||
{/* Remaining period should be decided based on Relay chain */}
|
||||
{when.gt(bestNumber) && (
|
||||
<BlockToTime
|
||||
api={isStakingAsync ? rcApi : undefined}
|
||||
value={when.sub(bestNumber)}
|
||||
/>
|
||||
)}
|
||||
<div>#{formatNumber(when)}</div>
|
||||
</>
|
||||
)}
|
||||
</td>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(RefEnd);
|
||||
Reference in New Issue
Block a user