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