Skip to content
Snippets Groups Projects
Commit d484b7b7 authored by Lukas's avatar Lukas Committed by mcfarhat
Browse files

Change cards order and add new card for hive chart

parent 64129136
No related branches found
No related tags found
1 merge request!599Lbudginas/#493 hive price chart
......@@ -17,6 +17,7 @@ import { getBlockDifference } from "./SyncInfo";
import { Toggle } from "../ui/toggle";
import { Card, CardContent, CardHeader } from "../ui/card";
import CurrentBlockCard from "./CurrentBlockCard";
import HeadBlockHiveChartCard from "./HeadBlockHiveChartCard";
interface HeadBlockCardProps {
headBlockCardData?: Explorer.HeadBlockCardData | any;
......@@ -61,6 +62,7 @@ const HeadBlockCard: React.FC<HeadBlockCardProps> = ({
timeCard: true,
supplyCard: true,
hiveParamsCard: true,
hiveChart: false,
});
const { settings, setSettings } = useUserSettingsContext();
......@@ -84,6 +86,13 @@ const HeadBlockCard: React.FC<HeadBlockCardProps> = ({
});
};
const handleHideHiveChart = () => {
setHiddenPropertiesByCard({
...hiddenPropertiesByCard,
hiveChart: !hiddenPropertiesByCard.hiveChart,
});
};
const {
explorerBlockNumber,
hiveBlockNumber,
......@@ -256,6 +265,14 @@ const HeadBlockCard: React.FC<HeadBlockCardProps> = ({
</CardHeader>
<CardContent className="p-4 space-y-4">
{/* Last Block Information */}
<CurrentBlockCard
blockDetails={blockDetails}
transactionCount={transactionCount}
opcount={opcount}
timeDifferenceInSeconds={timeDifferenceInSeconds}
liveBlockNumber={liveBlockNumber}
/>
{/* Other Information*/}
<div className="data-box">
<div>
......@@ -265,16 +282,14 @@ const HeadBlockCard: React.FC<HeadBlockCardProps> = ({
<span>Vests To Hive Ratio:</span> {liveVestsToHiveRatio} VESTS
</div>
</div>
{/* Last Block Information */}
<CurrentBlockCard
blockDetails={blockDetails}
transactionCount={transactionCount}
opcount={opcount}
timeDifferenceInSeconds={timeDifferenceInSeconds}
liveBlockNumber={liveBlockNumber}
/>
<div>
<HeadBlockHiveChartCard
header="Hive Price Chart"
isParamsHidden={hiddenPropertiesByCard.hiveChart}
handleHideParams={handleHideHiveChart}
isLoading={isBlockCardLoading}
/>
<HeadBlockPropertyCard
parameters={fundAndSupplyParameters}
header="Fund and Supply"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment