This commit is contained in:
Tomas Dvorak
2025-10-19 17:16:57 +02:00
parent e9a63073e5
commit 77213f4e83
76 changed files with 9728 additions and 935 deletions
+11 -2
View File
@@ -974,11 +974,20 @@ const CalendarPage: React.FC = () => {
const dt = new Date(`${selected.match.date}T${(selected.match.time || '00:00')}:00`);
const isPast = Date.now() >= dt.getTime();
const hasScore = Boolean(selected.match.score);
if (!hasScore && !isPast && modalCountdown.countdownString) {
// For future matches, always show countdown or "vs" - never the score
if (!isPast) {
if (modalCountdown.countdownString) {
return (
<Badge colorScheme="orange" fontSize="md" px={3} py={1}>za {modalCountdown.countdownString}</Badge>
);
}
return (
<Badge colorScheme="orange" fontSize="md" px={3} py={1}>za {modalCountdown.countdownString}</Badge>
<Badge colorScheme="gray" fontSize="md" px={3} py={1}>vs</Badge>
);
}
// For past matches, show score or "vs"
return (
<Badge colorScheme={hasScore ? (getSentiment(selected.match)?.color || 'gray') : 'gray'} fontSize="md" px={3} py={1}>
{hasScore ? selected.match.score : 'vs'}