This commit is contained in:
Tomas Dvorak
2025-10-21 15:02:05 +02:00
parent 68e69e00cc
commit 63700eedb2
103 changed files with 12442 additions and 446 deletions
+8 -3
View File
@@ -533,9 +533,14 @@ const CalendarPage: React.FC = () => {
// First try ID-based matching (most reliable)
let ourIsHome = false;
let ourIsAway = false;
if (clubId && m.home_id && m.away_id) {
ourIsHome = m.home_id === clubId;
ourIsAway = m.away_id === clubId;
if (clubId) {
// Check each team ID individually - even if one is missing, we can still match the other
if (m.home_id) {
ourIsHome = m.home_id === clubId;
}
if (m.away_id) {
ourIsAway = m.away_id === clubId;
}
}
// Fallback to name matching if IDs not available or no match