This commit is contained in:
@@ -1239,8 +1239,53 @@ export default function PredictionCard({ prediction }: PredictionCardProps) {
|
||||
marketProbability: uiText("market-probability-short", "Piyasa"),
|
||||
};
|
||||
|
||||
const leagueConfidence = prediction.match_info?.league_confidence;
|
||||
const leagueConfStyles: Record<string, { color: string; label: string }> = {
|
||||
high: {
|
||||
color: "green",
|
||||
label: uiText("league-conf-high", "Bu ligde model güçlü"),
|
||||
},
|
||||
medium: {
|
||||
color: "yellow",
|
||||
label: uiText("league-conf-medium", "Bu ligde model orta"),
|
||||
},
|
||||
low: {
|
||||
color: "red",
|
||||
label: uiText("league-conf-low", "Bu ligde model zayıf"),
|
||||
},
|
||||
};
|
||||
const leagueConfMeta = leagueConfidence
|
||||
? leagueConfStyles[leagueConfidence.label]
|
||||
: null;
|
||||
|
||||
return (
|
||||
<VStack align="stretch" gap={5}>
|
||||
{leagueConfidence && leagueConfMeta ? (
|
||||
<HStack
|
||||
justify="space-between"
|
||||
p={2.5}
|
||||
px={3}
|
||||
borderWidth="1px"
|
||||
borderColor={`${leagueConfMeta.color}.300`}
|
||||
bg={`${leagueConfMeta.color}.50`}
|
||||
borderRadius="lg"
|
||||
_dark={{ bg: `${leagueConfMeta.color}.950` }}
|
||||
flexWrap="wrap"
|
||||
gap={2}
|
||||
>
|
||||
<HStack gap={2}>
|
||||
<Badge colorPalette={leagueConfMeta.color} variant="solid">
|
||||
{leagueConfMeta.label}
|
||||
</Badge>
|
||||
<Text fontSize="xs" color="fg.muted">
|
||||
{uiText("league-conf-basis", "geçmiş performans")}: ROI{" "}
|
||||
{leagueConfidence.bet_roi > 0 ? "+" : ""}
|
||||
{leagueConfidence.bet_roi}% · {leagueConfidence.bet_n}{" "}
|
||||
{uiText("bets-short", "bahis")}
|
||||
</Text>
|
||||
</HStack>
|
||||
</HStack>
|
||||
) : null}
|
||||
{isLive ? (
|
||||
<Box
|
||||
p={3}
|
||||
|
||||
Reference in New Issue
Block a user