mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-25 12:35:18 -05:00
@@ -133,7 +133,7 @@ export function MatchActionTab({
|
||||
<TeamRadioOption
|
||||
team={teams[0]}
|
||||
isOwnTeam={teams[0].id === ownTeamId}
|
||||
hideLabel={ownTeamId == null}
|
||||
hideLabel={ownTeamId === null}
|
||||
className={styles.alpha}
|
||||
testId="winner-radio-1"
|
||||
/>
|
||||
|
||||
@@ -21,7 +21,7 @@ export function TournamentMatchActionTab({
|
||||
ownTeamId,
|
||||
}: {
|
||||
data: TournamentMatchLoaderData;
|
||||
ownTeamId: number;
|
||||
ownTeamId: number | null;
|
||||
}) {
|
||||
const { t } = useTranslation(["q"]);
|
||||
const tournament = useTournament();
|
||||
|
||||
@@ -62,7 +62,12 @@ export function TournamentMatchTabs({
|
||||
const opponentTwoId = teamTwo.id;
|
||||
const pickBanTeams: [MatchPageTeam, MatchPageTeam] = [teamOne, teamTwo];
|
||||
|
||||
const userTeamId = tournament.teamMemberOfByUser(user)?.id;
|
||||
const userTournamentTeamId = tournament.teamMemberOfByUser(user)?.id;
|
||||
const userTeamId =
|
||||
userTournamentTeamId === opponentOneId ||
|
||||
userTournamentTeamId === opponentTwoId
|
||||
? userTournamentTeamId
|
||||
: null;
|
||||
|
||||
const pickBanData = resolveTimelinePickBanData(
|
||||
data,
|
||||
@@ -102,10 +107,7 @@ export function TournamentMatchTabs({
|
||||
turnOfResult={turnOfResult}
|
||||
/>
|
||||
) : (
|
||||
<TournamentMatchActionTab
|
||||
data={data}
|
||||
ownTeamId={userTeamId ?? opponentOneId}
|
||||
/>
|
||||
<TournamentMatchActionTab data={data} ownTeamId={userTeamId} />
|
||||
)
|
||||
) : null}
|
||||
{tabs.includes(TAB_KEYS.ADMIN) ? (
|
||||
|
||||
Reference in New Issue
Block a user