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