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:
@@ -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}`}>
|
||||
|
||||
Reference in New Issue
Block a user