fix: every data with same ids

This commit is contained in:
RadoslavDimchev 2023-10-20 09:51:48 +03:00
parent 1b65aa0744
commit fec0532519
6 changed files with 13 additions and 12 deletions

View File

@ -22,19 +22,20 @@ const DeviceStorageHealth = ({ storage, maxStorage }: DeviceStorageHealthProps)
const data = (free: number) => { const data = (free: number) => {
return [ return [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value: storage, value: storage,
color: message === 'Good' ? GOOD_COLOR : POOR_COLOR, color: message === 'Good' ? GOOD_COLOR : POOR_COLOR,
}, },
{ {
id: 'storage', id: 'storage-free',
label: 'Free', label: 'Free',
value: free, value: free,
color: '#E7EAEE', color: '#E7EAEE',
}, },
] ]
} }
return ( return (
<Shadow <Shadow
variant="$2" variant="$2"

View File

@ -20,13 +20,13 @@ const StorageCard = ({ storage, maxStorage }: StorageCardProps) => {
const data = (free: number) => { const data = (free: number) => {
return [ return [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value: storage, value: storage,
color: '#E95460', color: '#E95460',
}, },
{ {
id: 'storage', id: 'storage-free',
label: 'Free', label: 'Free',
value: free, value: free,
color: '#E7EAEE', color: '#E7EAEE',

View File

@ -17,13 +17,13 @@ const ConsensusCard = ({ value, total }: ConsensusCardProps) => {
const style: CSSProperties = {} const style: CSSProperties = {}
const data = [ const data = [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value: value, value: value,
color: '#ff6161', color: '#ff6161',
}, },
{ {
id: 'storage', id: 'storage-free',
label: 'Free', label: 'Free',
value: total, value: total,
color: '#E7EAEE', color: '#E7EAEE',

View File

@ -14,13 +14,13 @@ type ExecutionClientCardProps = {
const ExecutionClientCard = ({ value, total }: ExecutionClientCardProps) => { const ExecutionClientCard = ({ value, total }: ExecutionClientCardProps) => {
const data = [ const data = [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value, value,
color: '#7140FD', color: '#7140FD',
}, },
{ {
id: 'storage', id: 'storage-free',
label: 'Free', label: 'Free',
value: total, value: total,
color: '#E7EAEE', color: '#E7EAEE',

View File

@ -17,13 +17,13 @@ const SyncStatusCardConsensus: React.FC<DeviceStorageHealthProps> = ({ synced, t
const data = [ const data = [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value: synced, value: synced,
color: '#ff6161', color: '#ff6161',
}, },
{ {
id: 'storage', id: 'storage-keys',
label: 'Free', label: 'Free',
value: total - synced || 1, value: total - synced || 1,
color: '#E7EAEE', color: '#E7EAEE',

View File

@ -15,13 +15,13 @@ const SyncStatusCardExecution: React.FC<DeviceStorageHealthProps> = ({ synced, t
const data = () => { const data = () => {
return [ return [
{ {
id: 'storage', id: 'storage-used',
label: 'Used', label: 'Used',
value: synced, value: synced,
color: '#2a4af5', color: '#2a4af5',
}, },
{ {
id: 'storage', id: 'storage-free',
label: 'Free', label: 'Free',
value: total - synced || 1, value: total - synced || 1,
color: '#E7EAEE', color: '#E7EAEE',