From 39c36d3415e09f2281e60fd5a501eaee4474aa0f Mon Sep 17 00:00:00 2001 From: Yana Date: Wed, 11 Dec 2024 21:10:06 +0700 Subject: [PATCH] wip --- explorer-nextjs/src/app/page.tsx | 10 ++++-- .../src/components/Cards/ExplorerCard.tsx | 8 ++++- .../NetworkStakeCard.tsx | 35 ++++++++++++++++--- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/explorer-nextjs/src/app/page.tsx b/explorer-nextjs/src/app/page.tsx index fd8999bdab..0f35837f79 100644 --- a/explorer-nextjs/src/app/page.tsx +++ b/explorer-nextjs/src/app/page.tsx @@ -190,7 +190,13 @@ export default function Home() { Mixnet in your hands - + {explorerData && } @@ -204,7 +210,7 @@ export default function Home() { )} - + {explorerData && ( )} diff --git a/explorer-nextjs/src/components/Cards/ExplorerCard.tsx b/explorer-nextjs/src/components/Cards/ExplorerCard.tsx index 889d2feb7f..974a410015 100644 --- a/explorer-nextjs/src/components/Cards/ExplorerCard.tsx +++ b/explorer-nextjs/src/components/Cards/ExplorerCard.tsx @@ -2,6 +2,12 @@ import { Card, CardContent, CardHeader, type SxProps } from "@mui/material"; const cardStyles = { p: 3, + height: "100%", + display: "flex", + flexDirection: "column", + justifyContent: "space-between", + alignItems: "stretch", + flexGrow: 1, }; const cardTitleStyles: SxProps = { @@ -10,7 +16,7 @@ const cardTitleStyles: SxProps = { letterSpacing: 0.7, }; const cardSubtitleStyles: SxProps = { - variant: "h2", + variant: "h3", mt: 3, color: "pine.400", }; diff --git a/explorer-nextjs/src/components/landingPageComponents/NetworkStakeCard.tsx b/explorer-nextjs/src/components/landingPageComponents/NetworkStakeCard.tsx index c855b09e0a..9f5031ee28 100644 --- a/explorer-nextjs/src/components/landingPageComponents/NetworkStakeCard.tsx +++ b/explorer-nextjs/src/components/landingPageComponents/NetworkStakeCard.tsx @@ -1,9 +1,10 @@ "use client"; import type { ExplorerData, IPacketsAndStakingData } from "@/app/api"; -import { formatBigNum } from "@/app/utils/formatBigNumbers"; +import { Box, Typography } from "@mui/material"; import { useEffect, useState } from "react"; -import { MonoCard } from "../cards/MonoCard"; -import type { ILineChartData } from "../lineChart"; +import ExplorerCard from "../Cards/ExplorerCard"; +import ExplorerListItem from "../List/ListItem"; +import { type ILineChartData, LineChart } from "../lineChart"; interface INetworkStakeCardProps { explorerData: ExplorerData | null; @@ -45,5 +46,31 @@ export const NetworkStakeCard = (props: INetworkStakeCardProps) => { title: `${currentStake} NYM` || "", graph: stakeLineGraphData, }; - return ; + const subtitle = `${currentStake} NYM` || ""; + return ( +
+ + + + {subtitle} + + {stakeLineGraphData && ( + + )} + + } + /> + +
+ ); };