feat: Punkte-Reveal with confetti animation

Shows animated reveal overlay for unseen match results.
Exact match (3pts) triggers confetti explosion.
Each reveal shown only once (localStorage tracking).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ronny
2026-04-11 19:10:22 +02:00
parent 89046a2e29
commit f6ab2c719d
6 changed files with 199 additions and 0 deletions
+8
View File
@@ -2,6 +2,8 @@ import { useState, useEffect, useCallback } from 'react';
import { api, Match } from '../api/client';
import MatchCard from '../components/MatchCard';
import TipModal from '../components/TipModal';
import { useRevealQueue } from '../hooks/useRevealQueue';
import ConfettiReveal from '../components/ConfettiReveal';
import styles from './MatchesPage.module.css';
type Section = {
@@ -101,6 +103,8 @@ export default function MatchesPage() {
});
}
const { current: revealMatch, dismissCurrent } = useRevealQueue(allMatches);
const filteredMatches = allMatches.filter(m => !stageFilter || m.stage === stageFilter);
const sections = groupIntoSections(filteredMatches);
@@ -110,6 +114,10 @@ export default function MatchesPage() {
return (
<div className={styles.page}>
{revealMatch && (
<ConfettiReveal match={revealMatch} onDismiss={dismissCurrent} />
)}
{/* Header Stats */}
<div className={styles.statsRow}>
<div className={`card ${styles.statCard}`}>