fix bugs
This commit is contained in:
@@ -550,9 +550,10 @@
|
||||
const name = bonusConfigs.find((b: BonusConfig) => b.id === r.bonusConfigId)?.name || r.label;
|
||||
map.set(name, (map.get(name) || 0) + 1);
|
||||
}
|
||||
// Only badge recurring/multiple bonuses — a single occurrence (×1) is
|
||||
// already obvious from the wallet, so it just adds noise here.
|
||||
return [...map.entries()].map(([name, count]) => ({ name, count })).filter((t) => t.count > 1);
|
||||
// Badge every bonus earned this week — including a single occurrence
|
||||
// (×1): the hero is the child's only at-a-glance signal, so nothing
|
||||
// earned should stay invisible here.
|
||||
return [...map.entries()].map(([name, count]) => ({ name, count }));
|
||||
});
|
||||
let anyWeekBonuses = $derived(weekRewards.length > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user