Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert tournament from useRef to useState
In the Tournament component, convert from a ref: const tournament_ref = useRef<TournamentInterface>(...); to a state: const tournament = useState<TournamentInterface>(...); This enabled the following additional changes: - Remove `refresh()`. - Removing redundant state, switching to `useMemo` for `sorted_players` and `raw_rounds` and local variables for others. - Reset non-tournament state when `tournament_id` changes. Depends on online-go#2575 (builds on top of it).
- Loading branch information