fix: improve tipping user journey

- Dashboard "Jetzt tippen" opens TipModal directly instead of
  navigating to /spiele (no more dead-end spielplan)
- After tipping, dashboard updates to show "Dein Tipp: X:Y ✓"
- Spielplan auto-opens all sections when only 1-2 exist
  (no more collapsed "Demnächst" as only section)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ronny
2026-04-11 20:51:36 +02:00
parent 57bae63b68
commit 676ed9c1b3
2 changed files with 43 additions and 3 deletions
+6 -1
View File
@@ -81,7 +81,12 @@ export default function MatchesPage() {
if (allMatches.length > 0) {
const filteredMatches = allMatches.filter(m => !stageFilter || m.stage === stageFilter);
const sections = groupIntoSections(filteredMatches);
setOpenSections(new Set(sections.filter(s => s.defaultOpen).map(s => s.key)));
// If only 1-2 sections exist, open all of them
if (sections.length <= 2) {
setOpenSections(new Set(sections.map(s => s.key)));
} else {
setOpenSections(new Set(sections.filter(s => s.defaultOpen).map(s => s.key)));
}
}
}, [allMatches]); // only on initial load