mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
dev day #67
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user