claude/inspiring-turing-9w84hu #94
2 changed files with 5 additions and 3 deletions
|
|
@ -70,7 +70,7 @@ function MatchResult({ match }: { match: GroupMatch }) {
|
||||||
<span className="truncate max-w-[80px]">{p2}</span>
|
<span className="truncate max-w-[80px]">{p2}</span>
|
||||||
</div>
|
</div>
|
||||||
{kickoff && (
|
{kickoff && (
|
||||||
<span className="text-[10px] text-muted-foreground/50">
|
<span className="text-[10px] text-muted-foreground/50" suppressHydrationWarning>
|
||||||
{kickoff.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" })}
|
{kickoff.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" })}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
@ -181,7 +181,7 @@ export function GroupStageStandings({
|
||||||
<div className="px-4 pb-3 space-y-0.5 border-t pt-2">
|
<div className="px-4 pb-3 space-y-0.5 border-t pt-2">
|
||||||
{[...byDay.entries()].map(([day, matches]) => (
|
{[...byDay.entries()].map(([day, matches]) => (
|
||||||
<div key={day} className="space-y-0.5">
|
<div key={day} className="space-y-0.5">
|
||||||
<p className="text-[10px] text-muted-foreground/70 uppercase tracking-wide pt-1">
|
<p className="text-[10px] text-muted-foreground/70 uppercase tracking-wide pt-1" suppressHydrationWarning>
|
||||||
{day}
|
{day}
|
||||||
</p>
|
</p>
|
||||||
{matches.map((m) => (
|
{matches.map((m) => (
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ export default function SportSeasonDetail({
|
||||||
} = loaderData;
|
} = loaderData;
|
||||||
|
|
||||||
const hasBracket = playoffMatches && playoffMatches.length > 0;
|
const hasBracket = playoffMatches && playoffMatches.length > 0;
|
||||||
|
const bracketHasTeams = hasBracket && playoffMatches.some((m) => m.participant1 !== null || m.participant2 !== null);
|
||||||
const hasStandings = regularSeasonStandings && regularSeasonStandings.length > 0;
|
const hasStandings = regularSeasonStandings && regularSeasonStandings.length > 0;
|
||||||
const showOtLosses = hasStandings && regularSeasonStandings.some((s) => s.otLosses !== null);
|
const showOtLosses = hasStandings && regularSeasonStandings.some((s) => s.otLosses !== null);
|
||||||
|
|
||||||
|
|
@ -75,7 +76,8 @@ export default function SportSeasonDetail({
|
||||||
|
|
||||||
const [view, setView] = useState<BracketView>(() => {
|
const [view, setView] = useState<BracketView>(() => {
|
||||||
if (showGroupStageToggle) {
|
if (showGroupStageToggle) {
|
||||||
return sportsSeason.status === "completed" ? "finished" : "playoffs";
|
if (sportsSeason.status === "completed") return "finished";
|
||||||
|
return bracketHasTeams ? "playoffs" : "groups";
|
||||||
}
|
}
|
||||||
if (!hasBracket) return "standings";
|
if (!hasBracket) return "standings";
|
||||||
if (sportsSeason.status === "completed") return "finished";
|
if (sportsSeason.status === "completed") return "finished";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue