commit 237d031ae6dcadc635a1e22e82083500e42f99a2
parent fbcaff9f7663ce6e4d7c586003138a88b36ecdeb
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 27 Nov 2023 14:46:26 -0300
do not show rate when is zero
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/demobank-ui/src/pages/admin/AdminHome.tsx b/packages/demobank-ui/src/pages/admin/AdminHome.tsx
@@ -212,7 +212,7 @@ function MetricValue({ current, previous, spec }: { spec: CurrencySpecification,
<i18n.Translate>from</i18n.Translate> {!previous ? "-" : <RenderAmount value={Amounts.parseOrThrow(previous)} spec={spec} hideSmall />}
</small>
</div>
- {negative !== undefined &&
+ {!!rate &&
<span data-negative={negative} class="flex items-center gap-x-1.5 w-fit rounded-md bg-green-100 text-green-800 data-[negative=true]:bg-red-100 px-2 py-1 text-xs font-medium data-[negative=true]:text-red-700 whitespace-pre">
{negative ?
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">