We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf62e22 commit 198e3d8Copy full SHA for 198e3d8
1 file changed
client/src/components/ui/eventHighlightCard.tsx
@@ -50,17 +50,18 @@ const renderCardHeader = (card: eventHighlightCardType) => {
50
);
51
};
52
53
+// helper to ensure sparkles are different
54
function getTwoUniqueIndexes(): [number, number] {
55
const first = Math.floor(Math.random() * 3);
56
let second = Math.floor(Math.random() * 3);
57
- // if number already chosen, change it
58
if (second === first) {
59
second = (first + 1) % 3;
60
}
61
return [first, second];
62
63
64
+// only render sparkles on specific cards
65
export function renderSparkleOverlay(card: eventHighlightCardType) {
66
const [i1, i2] = getTwoUniqueIndexes();
67
switch (card.id) {
0 commit comments