From 01303b625aa61d32de6457f97943afb5726d64e9 Mon Sep 17 00:00:00 2001 From: David Westgate Date: Sun, 9 Mar 2025 15:10:14 -0700 Subject: [PATCH] stop rendering 0 dist chips --- components/ChipDistributionSummary.tsx | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/components/ChipDistributionSummary.tsx b/components/ChipDistributionSummary.tsx index 686885b..3d8e7cb 100644 --- a/components/ChipDistributionSummary.tsx +++ b/components/ChipDistributionSummary.tsx @@ -179,20 +179,24 @@ const ChipDistributionSummary = ({ return ( <> - {denominations.map((denomination, index) => ( - - - {`${distributions[index]} ${i18n.t("chips")}: ${selectedCurrency}${denomination} ${i18n.t("each")}`} - - - ))} + {distributions.map((distribution, index) => { + return ( + distribution > 0 && ( + + + {`${distribution} ${i18n.t("chips")}: ${selectedCurrency}${denominations[index]} ${i18n.t("each")}`} + + + ) + ); + })}