mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-26 04:57:08 -05:00
Seeds on tournament match page
This commit is contained in:
@@ -67,7 +67,12 @@ export function TeamRosterInputs({
|
||||
/>
|
||||
Team {teamI + 1}
|
||||
</div>
|
||||
<h4>{team.name}</h4>
|
||||
<h4>
|
||||
<span className="tournament-bracket__during-match-actions__seed">
|
||||
#{data.seeds[teamI]}
|
||||
</span>{" "}
|
||||
{team.name}
|
||||
</h4>
|
||||
<WinnerRadio
|
||||
presentational={presentational}
|
||||
checked={
|
||||
|
||||
@@ -276,7 +276,25 @@ export const loader = ({ params }: LoaderArgs) => {
|
||||
return {
|
||||
match,
|
||||
results: findResultsByMatchId(matchId),
|
||||
seeds: resolveSeeds(),
|
||||
};
|
||||
|
||||
function resolveSeeds() {
|
||||
const tournamentId = tournamentIdFromParams(params);
|
||||
const teams = findTeamsByTournamentId(tournamentId);
|
||||
|
||||
const teamOneIndex = teams.findIndex(
|
||||
(team) => team.id === match.opponentOne?.id
|
||||
);
|
||||
const teamTwoIndex = teams.findIndex(
|
||||
(team) => team.id === match.opponentTwo?.id
|
||||
);
|
||||
|
||||
return [
|
||||
teamOneIndex !== -1 ? teamOneIndex + 1 : null,
|
||||
teamTwoIndex !== -1 ? teamTwoIndex + 1 : null,
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
export default function TournamentMatchPage() {
|
||||
|
||||
@@ -190,6 +190,11 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tournament-bracket__during-match-actions__seed {
|
||||
font-size: var(--fonts-xxs);
|
||||
color: var(--theme);
|
||||
}
|
||||
|
||||
.tournament-bracket__mode-progress {
|
||||
display: flex;
|
||||
margin-bottom: var(--s-4);
|
||||
|
||||
Reference in New Issue
Block a user