This commit is contained in:
Hristo Nedelkov 2023-11-01 19:36:18 +02:00
parent 287ede45f6
commit 5672514787
8 changed files with 44 additions and 45 deletions

View File

@ -66,7 +66,13 @@ const DashboardContent = () => {
</Stack>
<BasicInfoCards />
{/* SECOND ROW ENDS HERE! */}
{windowWidth < 1375 ? windowWidth < 850 ? DashboardContentLayoutPhone(windowWidth) : DashboardContentLayout(windowWidth) : (
{windowWidth < 1375 ? (
windowWidth < 850 ? (
DashboardContentLayoutPhone(windowWidth)
) : (
DashboardContentLayout(windowWidth)
)
) : (
<Stack
style={{
display: 'grid',
@ -76,9 +82,7 @@ const DashboardContent = () => {
}}
>
<YStack>
<XStack>
<ConsensusUptimeCard />
<ExecutionUptime />
</XStack>
@ -87,12 +91,10 @@ const DashboardContent = () => {
</YStack>
<YStack space={'$4'}>
<XStack space={'$4'}>
<StorageCard maxStorage={100} storage={82} />
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
</XStack>
<XStack space='$4'>
<XStack space="$4">
<MemoryCard currentMemory={[21, 33, 3, 42, 35]} maxMemory={50} />
<NetworkCard
@ -107,7 +109,8 @@ const DashboardContent = () => {
)
}
const DashboardContentLayout = (windowWidth: number) => {
return (<Stack
return (
<Stack
style={{
display: 'grid',
gridTemplateColumns: '1fr 1fr',
@ -117,9 +120,7 @@ const DashboardContentLayout = (windowWidth: number) => {
}}
>
<YStack>
<XStack>
<ConsensusUptimeCard />
<ExecutionUptime />
</XStack>
@ -136,7 +137,8 @@ const DashboardContentLayout = (windowWidth: number) => {
downloadRate={[12, 31, 22, 12, 23, 23, 90]}
uploadRate={[31, 22, 32, 132, 32, 45, 65]}
/>
</Stack>)
</Stack>
)
}
const DashboardContentLayoutPhone = (windowWidth: number) => {
@ -150,14 +152,11 @@ const DashboardContentLayoutPhone = (windowWidth: number) => {
width: '101%',
}}
>
<ConsensusUptimeCard />
<ExecutionUptime />
<DeviceUptime />
<StorageCard maxStorage={100} storage={82} />
<CPUCard load={[12, 31, 3, 2, 24, 98]} />