File tree 1 file changed +13
-7
lines changed
packages/page-staking/src/Query
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -6,34 +6,40 @@ import type { Props } from './types.js';
6
6
import React from 'react' ;
7
7
8
8
import { Columar , styled } from '@polkadot/react-components' ;
9
+ import { useApi } from '@polkadot/react-hooks' ;
9
10
10
11
import ChartPoints from './ChartPoints.js' ;
11
12
import ChartPrefs from './ChartPrefs.js' ;
12
13
import ChartRewards from './ChartRewards.js' ;
13
14
import ChartStake from './ChartStake.js' ;
14
15
15
16
function Validator ( { className = '' , labels, validatorId } : Props ) : React . ReactElement < Props > | null {
17
+ const { systemChain } = useApi ( ) ;
18
+ const isAlephChain = systemChain . includes ( 'Aleph Zero' ) ;
19
+
16
20
return (
17
21
< StyledColumar className = { className } >
18
22
< Columar . Column >
19
- < ChartPoints
23
+ < ChartStake
20
24
labels = { labels }
21
25
validatorId = { validatorId }
22
26
/>
23
- < ChartRewards
27
+ < ChartPrefs
24
28
labels = { labels }
25
29
validatorId = { validatorId }
26
30
/>
27
31
</ Columar . Column >
28
32
< Columar . Column >
29
- < ChartStake
30
- labels = { labels }
31
- validatorId = { validatorId }
32
- />
33
- < ChartPrefs
33
+ < ChartRewards
34
34
labels = { labels }
35
35
validatorId = { validatorId }
36
36
/>
37
+ { ! isAlephChain && (
38
+ < ChartPoints
39
+ labels = { labels }
40
+ validatorId = { validatorId }
41
+ />
42
+ ) }
37
43
</ Columar . Column >
38
44
</ StyledColumar >
39
45
) ;
You can’t perform that action at this time.
0 commit comments