fix: hide empty standings and first-leg sections
This commit is contained in:
+27
-26
@@ -413,32 +413,33 @@ class Sportsmanager {
|
|||||||
home: home.form,
|
home: home.form,
|
||||||
away: away.form,
|
away: away.form,
|
||||||
},
|
},
|
||||||
standing: Number(match.veranstaltung.tabellenwertung)
|
standing:
|
||||||
? {
|
Number(match.veranstaltung.tabellenwertung) > 0
|
||||||
home: {
|
? {
|
||||||
pos: Number(match.heim_team.platz),
|
home: {
|
||||||
name: match.heim_team.teamname,
|
pos: Number(match.heim_team.platz),
|
||||||
logo: match.heim_team.teambild,
|
name: match.heim_team.teamname,
|
||||||
games:
|
logo: match.heim_team.teambild,
|
||||||
match.heim_team.siege +
|
games:
|
||||||
match.heim_team.unentschieden +
|
match.heim_team.siege +
|
||||||
match.heim_team.niederlagen,
|
match.heim_team.unentschieden +
|
||||||
points: match.heim_team.begegnungspunkte,
|
match.heim_team.niederlagen,
|
||||||
diff: `${match.heim_team.spielpunkte_differenz > 0 ? "+" : ""}${match.heim_team.spielpunkte_differenz}`,
|
points: match.heim_team.begegnungspunkte,
|
||||||
},
|
diff: `${match.heim_team.spielpunkte_differenz > 0 ? "+" : ""}${match.heim_team.spielpunkte_differenz}`,
|
||||||
away: {
|
},
|
||||||
pos: Number(match.gast_team.platz),
|
away: {
|
||||||
name: match.gast_team.teamname,
|
pos: Number(match.gast_team.platz),
|
||||||
logo: match.gast_team.teambild,
|
name: match.gast_team.teamname,
|
||||||
games:
|
logo: match.gast_team.teambild,
|
||||||
match.gast_team.siege +
|
games:
|
||||||
match.gast_team.unentschieden +
|
match.gast_team.siege +
|
||||||
match.gast_team.niederlagen,
|
match.gast_team.unentschieden +
|
||||||
points: match.gast_team.begegnungspunkte,
|
match.gast_team.niederlagen,
|
||||||
diff: `${match.gast_team.spielpunkte_differenz > 0 ? "+" : ""}${match.gast_team.spielpunkte_differenz}`,
|
points: match.gast_team.begegnungspunkte,
|
||||||
},
|
diff: `${match.gast_team.spielpunkte_differenz > 0 ? "+" : ""}${match.gast_team.spielpunkte_differenz}`,
|
||||||
}
|
},
|
||||||
: undefined,
|
}
|
||||||
|
: undefined,
|
||||||
firstLeg:
|
firstLeg:
|
||||||
match.hinspiel &&
|
match.hinspiel &&
|
||||||
!(
|
!(
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ export function MatchInsights(props: {
|
|||||||
awayAvgGoals?: number; // z.B. 4.8
|
awayAvgGoals?: number; // z.B. 4.8
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div class="bg-gray-800/50 rounded-2xl p-4 border border-gray-800 space-y-4">
|
<Show when={props.firstLeg}>
|
||||||
<h3 class="text-xs font-bold uppercase tracking-wider text-gray-400 text-center">
|
<div class="bg-gray-800/50 rounded-2xl p-4 border border-gray-800 space-y-4">
|
||||||
Hinspiel
|
<h3 class="text-xs font-bold uppercase tracking-wider text-gray-400 text-center">
|
||||||
</h3>
|
Hinspiel
|
||||||
<Show when={props.firstLeg}>
|
</h3>
|
||||||
<MatchItem game={props.firstLeg} />
|
<MatchItem game={props.firstLeg} />
|
||||||
</Show>
|
</div>
|
||||||
</div>
|
</Show>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user