stop rendering 0 dist chips
This commit is contained in:
parent
ca042b3afb
commit
01303b625a
@ -179,7 +179,9 @@ const ChipDistributionSummary = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
{denominations.map((denomination, index) => (
|
{distributions.map((distribution, index) => {
|
||||||
|
return (
|
||||||
|
distribution > 0 && (
|
||||||
<View style={{ flexDirection: "row" }} key={index}>
|
<View style={{ flexDirection: "row" }} key={index}>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
@ -189,10 +191,12 @@ const ChipDistributionSummary = ({
|
|||||||
...(colors[index] === "white" && styles.shadow),
|
...(colors[index] === "white" && styles.shadow),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`${distributions[index]} ${i18n.t("chips")}: ${selectedCurrency}${denomination} ${i18n.t("each")}`}
|
{`${distribution} ${i18n.t("chips")}: ${selectedCurrency}${denominations[index]} ${i18n.t("each")}`}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
))}
|
)
|
||||||
|
);
|
||||||
|
})}
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flexDirection: "row", justifyContent: "space-between" }}>
|
<View style={{ flexDirection: "row", justifyContent: "space-between" }}>
|
||||||
<Text style={styles.p}>
|
<Text style={styles.p}>
|
||||||
|
Loading…
Reference in New Issue
Block a user