From a04b0f9298d622e060abf39016894ae9e706fb47 Mon Sep 17 00:00:00 2001 From: YoniKiriaty Date: Wed, 18 Feb 2026 18:16:35 +0200 Subject: [PATCH] Yoni - switching sides based on alliance --- .../frontend/src/scouter/pages/ScoutMatch.tsx | 16 ++++++++++++-- .../src/scouter/pages/tabs/AutoTab.tsx | 21 ++++++++++++------- .../src/scouter/pages/tabs/ShiftTab.tsx | 21 ++++++++++++------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/apps/scouting/frontend/src/scouter/pages/ScoutMatch.tsx b/apps/scouting/frontend/src/scouter/pages/ScoutMatch.tsx index 29a2202..9a1485c 100644 --- a/apps/scouting/frontend/src/scouter/pages/ScoutMatch.tsx +++ b/apps/scouting/frontend/src/scouter/pages/ScoutMatch.tsx @@ -178,6 +178,7 @@ export const ScoutMatch: FC = () => { createNewScoutingForm(), ); const [activeTabIndex, setActiveTab] = useState(STARTING_TAB_INDEX); + const [alliance, _setAlliance] = useState("blue"); const originTime = useMemo(() => Date.now(), []); const CurrentTab = useMemo( () => TABS[activeTabIndex].Component, @@ -193,7 +194,12 @@ export const ScoutMatch: FC = () => { from-black via-gray-900 to-black border-2 border-green-500 rounded-2xl shadow-[0_0_30px_rgba(34,197,94,0.3)] overflow-hidden h-[90vh] relative" > - + {alliance === "blue" && ( + + )}
+ {alliance === "red" && ( + + )} ); diff --git a/apps/scouting/frontend/src/scouter/pages/tabs/AutoTab.tsx b/apps/scouting/frontend/src/scouter/pages/tabs/AutoTab.tsx index ab16059..32e7679 100644 --- a/apps/scouting/frontend/src/scouter/pages/tabs/AutoTab.tsx +++ b/apps/scouting/frontend/src/scouter/pages/tabs/AutoTab.tsx @@ -16,16 +16,20 @@ export const AutoTab: FC = ({ const [mapPosition, setMapPosition] = useState(); const [mapZone, setMapZone] = useState(alliance); + const scoreMap = ( +
+ +
+ ); + return (
-
- -
+ {alliance === "red" && scoreMap}
{ @@ -63,6 +67,7 @@ export const AutoTab: FC = ({ Field Side
+ {alliance === "blue" && scoreMap}
); }; diff --git a/apps/scouting/frontend/src/scouter/pages/tabs/ShiftTab.tsx b/apps/scouting/frontend/src/scouter/pages/tabs/ShiftTab.tsx index db58c79..88fa86d 100644 --- a/apps/scouting/frontend/src/scouter/pages/tabs/ShiftTab.tsx +++ b/apps/scouting/frontend/src/scouter/pages/tabs/ShiftTab.tsx @@ -39,16 +39,20 @@ export const ShiftTab: FC = ({ }); }; + const scoreMap = ( +
+ +
+ ); + return (
-
- -
+ {alliance === "red" && scoreMap}
{ @@ -77,6 +81,7 @@ export const ShiftTab: FC = ({ Field Side
+ {alliance === "blue" && scoreMap}
); };