From 4affd727537da40e178936ea546e863fc28d5c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Tue, 6 Feb 2024 11:35:06 +0100 Subject: [PATCH] Update MarketTimer.tsx --- components/markets/MarketTimer.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/components/markets/MarketTimer.tsx b/components/markets/MarketTimer.tsx index 488a2ba66..fb27be3ef 100644 --- a/components/markets/MarketTimer.tsx +++ b/components/markets/MarketTimer.tsx @@ -2,6 +2,7 @@ import { isInfinite, MarketStage } from "@zeitgeistpm/sdk"; import { clamp } from "lodash-es"; import Skeleton from "components/ui/Skeleton"; import moment from "moment"; +import { isInfinity } from "@zeitgeistpm/utility/dist/infinity"; export type MarketTimerProps = { stage: MarketStage; @@ -32,19 +33,21 @@ export const MarketTimer = ({ stage }: MarketTimerProps) => { )} -
-
- {percentage.toFixed(0)}% -
-
-
+ {!isInfinity(stage.remainingTime) && ( +
+
+ {percentage.toFixed(0)}% +
+
+
+
-
+ )}
); };