fix: clear code

This commit is contained in:
Hristo Nedelkov 2023-09-21 10:31:43 +03:00
parent 33607b0fd9
commit d4874168e0
3 changed files with 9 additions and 21 deletions

View File

@ -11,16 +11,16 @@ import StandardGauge from '../../../components/Charts/StandardGauge'
type ConsensusCardProps = {
value: number
total: number
isTop?: boolean
}
const ConsensusCard = ({ value, total, isTop }: ConsensusCardProps) => {
const ConsensusCard = ({ value, total }: ConsensusCardProps) => {
const style: CSSProperties = {}
const data = [
{
id: 'storage',
label: 'Used',
value:value,
value: value,
color: '#ff6161',
},
{
@ -30,13 +30,7 @@ const ConsensusCard = ({ value, total, isTop }: ConsensusCardProps) => {
color: '#E7EAEE',
},
]
if (isTop === true) {
style.borderTopLeftRadius = '16px'
style.borderTopRightRadius = '16px'
} else if (isTop === false) {
style.borderBottomLeftRadius = '16px'
style.borderBottomRightRadius = '16px'
}
return (
<Shadow variant="$1" style={style}>

View File

@ -11,10 +11,10 @@ import StandardGauge from '../../../components/Charts/StandardGauge'
type ExecutionClientCardProps = {
value: number
total: number
isTop?: boolean
}
const ExecutionClientCard = ({ value, total, isTop }: ExecutionClientCardProps) => {
const ExecutionClientCard = ({ value, total }: ExecutionClientCardProps) => {
const data = [
{
id: 'storage',
@ -31,13 +31,7 @@ const ExecutionClientCard = ({ value, total, isTop }: ExecutionClientCardProps)
]
const style: CSSProperties = {}
if (isTop === true) {
style.borderTopLeftRadius = '16px'
style.borderTopRightRadius = '16px'
} else if (isTop === false) {
style.borderBottomLeftRadius = '16px'
style.borderBottomRightRadius = '16px'
}
return (
<Shadow variant="$1" style={style}>

View File

@ -15,9 +15,9 @@ const SyncStatusCard = () => {
</Text>
</Stack>
<YStack>
<ExecutionClientCard value={153.424} total={170} isTop={false} />
<ExecutionClientCard value={153.424} total={170} />
<Separator borderColor={'#e3e3e3'} />
<ConsensusCard value={103.424} total={170} isTop={true} />
<ConsensusCard value={103.424} total={170} />
</YStack>
</YStack>
</DashboardCardWrapper>