stop rendering 0 dist chips
This commit is contained in:
parent
ca042b3afb
commit
01303b625a
@ -179,20 +179,24 @@ const ChipDistributionSummary = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
{denominations.map((denomination, index) => (
|
{distributions.map((distribution, index) => {
|
||||||
<View style={{ flexDirection: "row" }} key={index}>
|
return (
|
||||||
<Text
|
distribution > 0 && (
|
||||||
style={{
|
<View style={{ flexDirection: "row" }} key={index}>
|
||||||
...styles.h2,
|
<Text
|
||||||
fontWeight: "bold",
|
style={{
|
||||||
color: colors[index],
|
...styles.h2,
|
||||||
...(colors[index] === "white" && styles.shadow),
|
fontWeight: "bold",
|
||||||
}}
|
color: colors[index],
|
||||||
>
|
...(colors[index] === "white" && styles.shadow),
|
||||||
{`${distributions[index]} ${i18n.t("chips")}: ${selectedCurrency}${denomination} ${i18n.t("each")}`}
|
}}
|
||||||
</Text>
|
>
|
||||||
</View>
|
{`${distribution} ${i18n.t("chips")}: ${selectedCurrency}${denominations[index]} ${i18n.t("each")}`}
|
||||||
))}
|
</Text>
|
||||||
|
</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