diff --git a/app/components/match-page/MatchActionTab.module.css b/app/components/match-page/MatchActionTab.module.css index b8b018a77..870054a45 100644 --- a/app/components/match-page/MatchActionTab.module.css +++ b/app/components/match-page/MatchActionTab.module.css @@ -21,7 +21,7 @@ } } -.withPoints { +.withKo { grid-template-areas: "header header header" "actions actions actions" diff --git a/app/components/match-page/MatchActionTab.tsx b/app/components/match-page/MatchActionTab.tsx index 34536f839..fe6702496 100644 --- a/app/components/match-page/MatchActionTab.tsx +++ b/app/components/match-page/MatchActionTab.tsx @@ -39,8 +39,8 @@ interface MatchActionTabProps { ownTeamId: number | null; stageId: StageId; mode: ModeShort; - withPoints: boolean; - onSubmit?: (data: { winnerId: number; points?: [number, number] }) => void; + withKo: boolean; + onSubmit?: (data: { winnerId: number; ko?: boolean }) => void; isSubmitting?: boolean; setEnding?: SetEndingData; actionButtons?: React.ReactNode; @@ -52,7 +52,7 @@ export function MatchActionTab({ ownTeamId, stageId, mode, - withPoints, + withKo, onSubmit, isSubmitting, setEnding, @@ -73,14 +73,7 @@ export function MatchActionTab({ const submit = () => { if (winnerId === null) return; - const submitPoints: [number, number] | undefined = withPoints - ? isKo - ? winnerId === teams[0].id - ? [100, 0] - : [0, 100] - : [0, 0] - : undefined; - onSubmit?.({ winnerId, points: submitPoints }); + onSubmit?.({ winnerId, ko: withKo ? isKo : undefined }); }; return ( @@ -92,14 +85,14 @@ export function MatchActionTab({ mode={mode} winnerId={winnerId} teams={teams} - withPoints={withPoints} + withKo={withKo} isKo={isKo} isSubmitting={isSubmitting} onBack={() => setConfirming(false)} onConfirm={submit} /> ) : ( -
+
{t("q:match.action.selectWinner")}
{actionButtons ? (
{actionButtons}
@@ -156,7 +149,7 @@ export function MatchActionTab({ /> - {withPoints ? ( + {withKo ? (