fix: change props names

This commit is contained in:
RadoslavDimchev 2023-08-30 11:36:41 +03:00
parent 9ae769ef6b
commit adbbf7f9db
2 changed files with 11 additions and 11 deletions

View File

@ -45,9 +45,9 @@ const ActivationCard = ({
{text} {text}
</Text> </Text>
<ActivationSyncCard <ActivationSyncCard
color={gaugeColor || ''} gaugeColor={gaugeColor || ''}
synced={gaugeSynced || 0} gaugeSynced={gaugeSynced || 0}
total={gaugeTotal || 1} gaugeTotal={gaugeTotal || 1}
/> />
</Stack> </Stack>
)} )}

View File

@ -4,12 +4,12 @@ import { Text } from '@status-im/components'
import { formatNumberForGauge } from '../../../utilities' import { formatNumberForGauge } from '../../../utilities'
type ActivationSyncCardProps = { type ActivationSyncCardProps = {
synced: number gaugeColor: string
total: number gaugeSynced: number
color: string gaugeTotal: number
} }
const ActivationSyncCard = ({ synced, total, color }: ActivationSyncCardProps) => { const ActivationSyncCard = ({ gaugeColor, gaugeSynced, gaugeTotal }: ActivationSyncCardProps) => {
return ( return (
<XStack space={'$2'} alignItems="center"> <XStack space={'$2'} alignItems="center">
<Stack <Stack
@ -23,13 +23,13 @@ const ActivationSyncCard = ({ synced, total, color }: ActivationSyncCardProps) =
{ {
id: 'sync card', id: 'sync card',
label: 'Sync Status', label: 'Sync Status',
value: synced, value: gaugeSynced,
color: color, color: gaugeColor,
}, },
{ {
id: 'free', id: 'free',
label: 'free', label: 'free',
value: total - synced || 1, value: gaugeTotal - gaugeSynced || 1,
color: '#E7EAEE', color: '#E7EAEE',
}, },
]} ]}
@ -37,7 +37,7 @@ const ActivationSyncCard = ({ synced, total, color }: ActivationSyncCardProps) =
</Stack> </Stack>
<YStack> <YStack>
<Text size={15} weight={'semibold'}> <Text size={15} weight={'semibold'}>
{formatNumberForGauge(synced)} / {formatNumberForGauge(total)} {formatNumberForGauge(gaugeSynced)} / {formatNumberForGauge(gaugeTotal)}
</Text> </Text>
</YStack> </YStack>
</XStack> </XStack>