fix gauge data

This commit is contained in:
Hristo Nedelkov 2023-08-29 12:11:14 +03:00
parent 13b4d9a8c7
commit a70faff550
2 changed files with 14 additions and 5 deletions

View File

@ -32,13 +32,13 @@ const Activation = () => {
<YStack space={'$2'} marginTop={'10px'} width={'33%'}>
<XStack space={'$2'} justifyContent={'space-between'}>
<ActivationCard text="Validators" value="4" />
<ActivationCard text="Execution Sync Status" value="" isGaugeIncluded={true} />
<ActivationCard text="Execution Sync Status" value="" isGaugeIncluded={true} gaugeColor={'#EB5757'} />
<ActivationCard text="Execution Sync Status" value="" isGaugeIncluded={true} gaugeSynced={135324} gaugeTotal={200000}/>
<ActivationCard text="Execution Sync Status" value="" isGaugeIncluded={true} gaugeColor={'#EB5757'} gaugeSynced={35324} gaugeTotal={200000}/>
</XStack>
<XStack space={'$2'}>
<ActivationCard text="Current APR" value="4.40%" />
<ActivationCard text="Estimated Activation Time" value="32 Days" />
<ActivationCard text="Estimated Activation Time" value="" />
<ActivationCard text="Estimated Activation Time" value="92603" />
</XStack>
</YStack>
</YStack>

View File

@ -7,9 +7,18 @@ type ActivationCardProps = {
value: string
isGaugeIncluded?: boolean
gaugeColor?: string
gaugeSynced?: number
gaugeTotal?: number
}
const ActivationCard = ({ text, value, isGaugeIncluded, gaugeColor }: ActivationCardProps) => {
const ActivationCard = ({
text,
value,
isGaugeIncluded,
gaugeColor,
gaugeSynced,
gaugeTotal,
}: ActivationCardProps) => {
return (
<YStack
style={{
@ -35,7 +44,7 @@ const ActivationCard = ({ text, value, isGaugeIncluded, gaugeColor }: Activation
<Text size={13} weight={'semibold'}>
{text}
</Text>
<ActivationSyncCard color={gaugeColor} synced={132123} total={200000} />
<ActivationSyncCard color={gaugeColor} synced={gaugeSynced} total={gaugeTotal} />
</Stack>
)}
</YStack>