chore: update

This commit is contained in:
2026-06-12 16:11:41 +02:00
parent 370b1a5742
commit d18052e749
6 changed files with 321 additions and 72 deletions
+1
View File
@@ -922,6 +922,7 @@ export type RewardCategoryConfig = {
category: string;
all_products: boolean;
product_ids: number[];
product_names: string[];
amount: number;
};
@@ -493,13 +493,19 @@ export default function OrderHistoryScreen() {
</View>
{pool.eligible_configs.length > 0 && (
<View style={{ flexDirection: "row", flexWrap: "wrap", gap: 4, marginBottom: spacing.xs }}>
{pool.eligible_configs.map((cfg) => (
<View key={cfg.category} style={styles.rewardAmountBadge}>
<Text style={styles.rewardAmountText}>
{cfg.category}{cfg.amount > 0 ? `${cfg.amount}` : ""}
</Text>
</View>
))}
{pool.eligible_configs.flatMap((cfg) =>
cfg.all_products
? [<View key={cfg.category} style={styles.rewardAmountBadge}>
<Text style={styles.rewardAmountText}>
{cfg.category}{cfg.amount > 0 ? `${cfg.amount}` : ""}
</Text>
</View>]
: (cfg.product_names ?? []).map((name) => (
<View key={`${cfg.category}-${name}`} style={styles.rewardAmountBadge}>
<Text style={styles.rewardAmountText}>{name}</Text>
</View>
))
)}
</View>
)}
<View style={styles.progressBarBg}>