fix: add keys to validators tabs

This commit is contained in:
RadoslavDimchev 2023-10-20 09:39:51 +03:00
parent 638063967a
commit 1b65aa0744
3 changed files with 4 additions and 2 deletions

View File

@ -31,14 +31,14 @@ const ValidatorsTabs = () => {
<Stack style={{ cursor: 'pointer', width: 'fit-content' }}> <Stack style={{ cursor: 'pointer', width: 'fit-content' }}>
<Tabs.List size={32}> <Tabs.List size={32}>
{VALIDATOR_TABS.map(tab => ( {VALIDATOR_TABS.map(tab => (
<Tabs.Trigger type="default" value={tab.value}> <Tabs.Trigger key={tab.value} type="default" value={tab.value}>
{tab.label} {tab.label}
</Tabs.Trigger> </Tabs.Trigger>
))} ))}
</Tabs.List> </Tabs.List>
</Stack> </Stack>
{VALIDATOR_TABS.map(tab => ( {VALIDATOR_TABS.map(tab => (
<Tabs.Content value={tab.value} style={{ marginTop: '8px' }}> <Tabs.Content key={tab.value} value={tab.value} style={{ marginTop: '8px' }}>
{tab.children} {tab.children}
</Tabs.Content> </Tabs.Content>
))} ))}

View File

@ -33,6 +33,7 @@ const CPUCard = ({ load }: CPUCardProps) => {
})), })),
}, },
] ]
const currentLoad = const currentLoad =
chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0 chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0

View File

@ -35,6 +35,7 @@ const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => {
maxValue: maxMemory, maxValue: maxMemory,
}, },
] ]
const currentLoad = const currentLoad =
chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0 chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0