mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-14 16:45:46 +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,33 @@
|
||||
// Copyright 2017-2025 @pezkuwi/app-staking authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { u32 } from '@pezkuwi/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Badge } from '@pezkuwi/react-components';
|
||||
import { useApi } from '@pezkuwi/react-hooks';
|
||||
|
||||
interface Props {
|
||||
numNominators?: number;
|
||||
}
|
||||
|
||||
function MaxBadge ({ numNominators }: Props): React.ReactElement<Props> | null {
|
||||
const { api } = useApi();
|
||||
|
||||
const max = api.consts.staking?.maxNominatorRewardedPerValidator as u32;
|
||||
|
||||
if (!numNominators || !max || max.gten(numNominators)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Badge
|
||||
className='media--1200'
|
||||
color='red'
|
||||
icon='balance-scale-right'
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(MaxBadge);
|
||||
Reference in New Issue
Block a user