mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Fix impossible admin action preselected when tournament has started
This commit is contained in:
parent
9c9ff3333c
commit
b762c68ac3
|
|
@ -396,7 +396,12 @@ function TeamActions() {
|
|||
);
|
||||
const [selectedAction, setSelectedAction] = React.useState<
|
||||
(typeof actions)[number]
|
||||
>(actions[0]);
|
||||
>(
|
||||
// if started, default to action with no restrictions
|
||||
tournament.hasStarted
|
||||
? actions.find((a) => a.when.length === 0)!
|
||||
: actions[0],
|
||||
);
|
||||
|
||||
const selectedTeam = tournament.teamById(selectedTeamId);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user