+
{match.name}
+ {(match.startTime || match.endTime) && (
+
+ {match.startTime && (
+ Start: {new Date(match.startTime).toLocaleString()}
+ )}
+ {match.startTime && match.endTime && ·}
+ {match.endTime && (
+ End: {new Date(match.endTime).toLocaleString()}
+ )}
+
+ )}
+
+ {match.isBye ? (
+ BYE
+ ) : (
+ <>
+
+ {match.team1Name ||
+ [match.team1Player1?.name, match.team1Player2?.name].filter(Boolean).join(' / ') ||
+ 'TBD'}
+
+ vs
+
+ {match.team2Name ||
+ [match.team2Player1?.name, match.team2Player2?.name].filter(Boolean).join(' / ') ||
+ 'TBD'}
+
+ >
+ )}
+
+ {showScore && (
+
+ {isFetchingScores ? (
+
+ ) : scores.length > 0 ? (
+
+ {scores
+ .sort((a: any, b: any) => a.setNumber - b.setNumber)
+ .map((score: any) => (
+
+ Set {score.setNumber}: {score.team1Points}-{score.team2Points}
+
+ ))}
+
+ ) : (
+
No scores yet
+ )}
+
+ )}
+