Skip to content
Snippets Groups Projects
Commit 3ee0cb02 authored by Dima Rifai's avatar Dima Rifai
Browse files

Issue #479 - Add zero change icon when balance is not changing

parent ee45eeee
No related branches found
No related tags found
1 merge request!587Delrifai/#479 use aggregated balance api
......@@ -13,7 +13,8 @@ import {
import { formatNumber } from "@/lib/utils";
import { cn } from "@/lib/utils";
import moment from "moment";
import { ArrowDown, ArrowUp } from "lucide-react";
import { ArrowDown, ArrowUp, Minus } from "lucide-react";
interface BalanceHistoryChartProps {
hiveBalanceHistoryData?: {
......@@ -117,6 +118,7 @@ const BalanceHistoryChart: React.FC<BalanceHistoryChartProps> = ({
const balanceChange = payload[0]?.payload.balance_change ?? 0;
const isPositiveChange = balanceChange > 0;
const isZeroChange = balanceChange == 0;
return (
<div className="bg-theme dark:bg-theme p-2 rounded border border-explorer-light-gray">
......@@ -127,7 +129,7 @@ const BalanceHistoryChart: React.FC<BalanceHistoryChartProps> = ({
{isPositiveChange ? (
<ArrowUp className="bg-green-400 p-[1.2px]" size={16}/>
) : (
) : isZeroChange ? <Minus className="bg-black p-[1.2px] mr-1" color={"white"} size={16}/> : (
<ArrowDown className="bg-red-400 p-[1.2px]" size={16}/>
)}
{` ${formatNumber(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment