From c7120820bf252b2a646073a58b06637061f3faee Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Wed, 9 Aug 2023 10:32:55 +0300 Subject: [PATCH] fix: add new props to the type --- src/components/HealthInfoSection.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/components/HealthInfoSection.tsx b/src/components/HealthInfoSection.tsx index 972585f0..9edd5e92 100644 --- a/src/components/HealthInfoSection.tsx +++ b/src/components/HealthInfoSection.tsx @@ -1,11 +1,5 @@ import { YStack } from 'tamagui' import { useEffect, useState } from 'react' - -// Add more constant texts -const BAD_STORAGE_TEXT = 'Your storage is running low as required for additional node services.' -const CPU_CLOCK_RATE_TEXT = '2.4GHz is recommended for CPU.' -const GOOD_RAM_MEMORY_TEXT = 'There is sufficient RAM required for selected services.' -const NETWORK_TEXT = 'Network Latency is low.' import StatusIconText from './StatusIconText' import { BAD_CPU_CLOCK_RATE_TEXT, @@ -19,10 +13,12 @@ import { } from '../constants' type HealthInfoSectionProps = { - usedStorage: number - maxStorage: number - usedRamMemory: number - maxRamMemory: number + usedStorage: number // GB + maxStorage: number // GB + usedRamMemory: number // GB + maxRamMemory: number // GB + cpuClockRate: number // GHz + networkLatency: number // milliseconds } const HealthInfoSection = (props: HealthInfoSectionProps) => { @@ -39,7 +35,6 @@ const HealthInfoSection = (props: HealthInfoSectionProps) => { setUsedRamMemoryPercentage((usedRamMemory / maxRamMemory) * 100) }, [usedRamMemory, maxRamMemory]) - return return (