fix: clear code
This commit is contained in:
parent
33607b0fd9
commit
d4874168e0
|
@ -11,10 +11,10 @@ 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 = [
|
||||
{
|
||||
|
@ -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}>
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue