From 7fbc6670a801522c8d52c6756b1838c618b248b8 Mon Sep 17 00:00:00 2001 From: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com> Date: Sat, 16 Dec 2023 11:46:50 -0800 Subject: [PATCH] Attempt at fix for controller tgui from j snow advice --- .../tgui/interfaces/TournamentController.tsx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tgui/packages/tgui/interfaces/TournamentController.tsx b/tgui/packages/tgui/interfaces/TournamentController.tsx index 4dd68a71dcd..7f5bd919f9e 100644 --- a/tgui/packages/tgui/interfaces/TournamentController.tsx +++ b/tgui/packages/tgui/interfaces/TournamentController.tsx @@ -10,12 +10,11 @@ type TournamentControllerData = { }; const ArenaInfo = (props, context) => { - const { act, data } = useBackend(context); + const { act, data } = useBackend(); const [selectedArena, setSelectedArea] = useLocalState( - context, 'selectedArena', - null + null, ); return ( @@ -25,10 +24,11 @@ const ArenaInfo = (props, context) => { + }} + > {'Arena - ' + data.arena_id} @@ -40,7 +40,8 @@ const ArenaInfo = (props, context) => { /> - }> + } + > { act('load_arena', { arena_template: selectedArena, }) - }> + } + > Load @@ -69,24 +71,21 @@ const ArenaInfo = (props, context) => { }; const RoundInfo = (props, context) => { - const { act, data } = useBackend(context); + const { act, data } = useBackend(); const [selectedTeamA, setSelectedTeamA] = useLocalState( - context, 'selectedTeamA', - data.team_names[0] + data.team_names[0], ); const [selectedTeamB, setSelectedTeamB] = useLocalState( - context, 'selectedTeamB', - data.team_names[1] + data.team_names[1], ); const [respawnRemove, setRespawnRemove] = useLocalState( - context, 'respawnRemove', - true + true, ); return ( @@ -120,7 +119,8 @@ const RoundInfo = (props, context) => { icon="user-edit" onClick={() => { act('vv_teams'); - }}> + }} + > VV teams