Import state of validators with useSelector
This commit is contained in:
parent
d9d872f8ff
commit
bc05e5e979
|
@ -1,12 +1,15 @@
|
||||||
import { Avatar, Tabs, Text } from '@status-im/components'
|
import { Avatar, Tabs, Text } from '@status-im/components'
|
||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack, YStack } from 'tamagui'
|
||||||
import ValidatorListItem from './ValidatorListItem'
|
|
||||||
import AddCard from '../../../components/General/AddCards/AddCard'
|
import AddCard from '../../../components/General/AddCards/AddCard'
|
||||||
import ValidatorsList from './ValidatorsList'
|
import ValidatorsList from './ValidatorsList'
|
||||||
import AlertsList from './AlertsList'
|
import AlertsList from './AlertsList'
|
||||||
import LogsList from './LogsList'
|
import LogsList from './LogsList'
|
||||||
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
const RightSidebar = () => {
|
const RightSidebar = () => {
|
||||||
|
const countOfValidators = useSelector((state: any) => state.rightSidebar.countOfValidators)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack
|
<YStack
|
||||||
space={'$4'}
|
space={'$4'}
|
||||||
|
@ -44,7 +47,10 @@ const RightSidebar = () => {
|
||||||
</YStack>
|
</YStack>
|
||||||
<AddCard padding={'0 2vw'} />
|
<AddCard padding={'0 2vw'} />
|
||||||
</XStack>
|
</XStack>
|
||||||
|
<XStack justifyContent={'space-between'} width={'85%'}>
|
||||||
|
<Text size={19} weight={'semibold'}>Validators</Text>
|
||||||
|
<Text size={19} weight={'semibold'}>{countOfValidators}</Text>
|
||||||
|
</XStack>
|
||||||
<Tabs defaultValue="active">
|
<Tabs defaultValue="active">
|
||||||
<Tabs.List size={32}>
|
<Tabs.List size={32}>
|
||||||
<Tabs.Trigger type="default" value="active">
|
<Tabs.Trigger type="default" value="active">
|
||||||
|
@ -61,10 +67,10 @@ const RightSidebar = () => {
|
||||||
<ValidatorsList />
|
<ValidatorsList />
|
||||||
</Tabs.Content>
|
</Tabs.Content>
|
||||||
<Tabs.Content value="pending">
|
<Tabs.Content value="pending">
|
||||||
<ValidatorListItem name={'Validator 5'} avatarKey={'37880sfsef38fsb'} />
|
<ValidatorsList />
|
||||||
</Tabs.Content>
|
</Tabs.Content>
|
||||||
<Tabs.Content value="inactive">
|
<Tabs.Content value="inactive">
|
||||||
<ValidatorListItem name={'Validator 6'} avatarKey={'37880sfsef38fsb'} />
|
<ValidatorsList />
|
||||||
</Tabs.Content>
|
</Tabs.Content>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue