Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tournament moderation tools broken by f0a617aa009781d1fcbb7074df04e0ac7b68edb2 #2606

Closed
dexonsmith opened this issue Feb 29, 2024 · 0 comments · Fixed by #2607
Closed

Tournament moderation tools broken by f0a617aa009781d1fcbb7074df04e0ac7b68edb2 #2606

dexonsmith opened this issue Feb 29, 2024 · 0 comments · Fixed by #2607
Assignees

Comments

@dexonsmith
Copy link
Contributor

dexonsmith commented Feb 29, 2024

Describe the bug
Tournament moderation tools stopped working after f0a617a (confirmed by a git-bisect). Reported on the forums: https://forums.online-go.com/t/i-cant-disqualify-a-player-from-a-tournament-anymore/50914/.

E.g., the "Disqualify" button is missing when you click on a player.

@dexonsmith dexonsmith self-assigned this Feb 29, 2024
dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Feb 29, 2024
After f0a617a, tournament is immutable state
(new copy on changes), not a mutable ref, so the renderExtraPlayerActions
callback wasn't being kept up-to-date when the tournament changed.  Split it
out to its own `useEffect` that updates when the relevant tournament fields do.

Tested:

- Director of started tournament (disqualify and adjust points)
- Director of not-started tournament (kick)
- Non-director (no actions)
- Switching between them via the search box, which reuses the same component

Fixes online-go#2606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant