From 74f89a61c4526e7afdc845329a27f37f2b85eed1 Mon Sep 17 00:00:00 2001 From: Kyle Flynn Date: Tue, 16 Apr 2024 21:22:03 -0400 Subject: [PATCH] fixed build errors --- front-end/src/apps/Settings/index.tsx | 2 +- front-end/src/apps/Settings/tabs/audience.tsx | 2 +- front-end/src/apps/reports/reports-app.tsx | 2 +- .../components/Dialogs/LoginDialog/LoginDialog.tsx | 2 +- .../components/buttons/LogoutButton/LogoutButton.tsx | 2 +- front-end/src/hooks/use-season-components.ts | 2 +- front-end/src/layouts/DefaultLayout.tsx | 2 +- front-end/src/layouts/PaperLayout.tsx | 2 +- front-end/src/layouts/RefereeLayout.tsx | 2 +- .../src/seasons/ChargedUp/referee/AutoScoreSheet.tsx | 4 ++-- .../src/seasons/ChargedUp/referee/PenaltySheet.tsx | 4 ++-- .../src/seasons/ChargedUp/referee/ScoreSheet.tsx | 4 ++-- .../src/seasons/ChargedUp/referee/TeamSheet.tsx | 7 ++----- .../seasons/ChargedUp/referee/TeleOpScoreSheet.tsx | 4 ++-- .../src/seasons/Crescendo/referee/AutoScoreSheet.tsx | 4 ++-- .../src/seasons/Crescendo/referee/PenaltySheet.tsx | 4 ++-- .../src/seasons/Crescendo/referee/ScoreSheet.tsx | 4 ++-- .../src/seasons/Crescendo/referee/TeamSheet.tsx | 7 ++----- .../seasons/Crescendo/referee/TeleOpScoreSheet.tsx | 6 +++--- .../HydrogenHorizons/referee/PenaltySheet.tsx | 4 ++-- .../seasons/HydrogenHorizons/referee/ScoreSheet.tsx | 4 ++-- .../seasons/HydrogenHorizons/referee/TeamSheet.tsx | 1 - .../HydrogenHorizons/referee/TeleOpScoreSheet.tsx | 12 +++++------- 23 files changed, 39 insertions(+), 48 deletions(-) diff --git a/front-end/src/apps/Settings/index.tsx b/front-end/src/apps/Settings/index.tsx index bbfc3134..ca2720c9 100644 --- a/front-end/src/apps/Settings/index.tsx +++ b/front-end/src/apps/Settings/index.tsx @@ -13,7 +13,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; import { currentEventKeyAtom, currentTournamentKeyAtom -} from 'src/stores/NewRecoil'; +} from 'src/stores/recoil'; import { Tournament } from '@toa-lib/models'; import FrcFmsSettingsTab from './tabs/frc-fms'; // import FrcFmsSettingsTab from './tabs/frc-fms'; diff --git a/front-end/src/apps/Settings/tabs/audience.tsx b/front-end/src/apps/Settings/tabs/audience.tsx index 8c0b02a7..d4df6c41 100644 --- a/front-end/src/apps/Settings/tabs/audience.tsx +++ b/front-end/src/apps/Settings/tabs/audience.tsx @@ -1,7 +1,7 @@ import { FC } from 'react'; import Box from '@mui/material/Box'; import { useRecoilState } from 'recoil'; -import { displayChromaKeyAtom } from 'src/stores/NewRecoil'; +import { displayChromaKeyAtom } from 'src/stores/recoil'; import { TextSetting } from '../components/text-setting'; import { updateSocketClient } from 'src/api/use-socket-data'; diff --git a/front-end/src/apps/reports/reports-app.tsx b/front-end/src/apps/reports/reports-app.tsx index 3951b1ed..59fd44cb 100644 --- a/front-end/src/apps/reports/reports-app.tsx +++ b/front-end/src/apps/reports/reports-app.tsx @@ -10,7 +10,7 @@ import { TournamentReports } from './tournament-reports'; import { currentEventKeyAtom, currentTournamentKeyAtom -} from 'src/stores/NewRecoil'; +} from 'src/stores/recoil'; import { useTournamentsForEvent } from 'src/api/use-tournament-data'; import TournamentDropdown from 'src/components/dropdowns/tournament-dropdown'; diff --git a/front-end/src/components/Dialogs/LoginDialog/LoginDialog.tsx b/front-end/src/components/Dialogs/LoginDialog/LoginDialog.tsx index 99ab9ee0..1e2c0543 100644 --- a/front-end/src/components/Dialogs/LoginDialog/LoginDialog.tsx +++ b/front-end/src/components/Dialogs/LoginDialog/LoginDialog.tsx @@ -13,7 +13,7 @@ import { useSetRecoilState } from 'recoil'; import { login } from 'src/api/use-login-data'; import { useSocket } from 'src/api/use-socket'; import useLocalStorage from 'src/stores/LocalStorage'; -import { userAtom } from 'src/stores/NewRecoil'; +import { userAtom } from 'src/stores/recoil'; interface Props { open: boolean; diff --git a/front-end/src/components/buttons/LogoutButton/LogoutButton.tsx b/front-end/src/components/buttons/LogoutButton/LogoutButton.tsx index f1d6b9a2..4fbbdd8e 100644 --- a/front-end/src/components/buttons/LogoutButton/LogoutButton.tsx +++ b/front-end/src/components/buttons/LogoutButton/LogoutButton.tsx @@ -4,7 +4,7 @@ import { FC } from 'react'; import { useSetRecoilState } from 'recoil'; import { logout } from 'src/api/use-login-data'; import useLocalStorage from 'src/stores/LocalStorage'; -import { userAtom } from 'src/stores/NewRecoil'; +import { userAtom } from 'src/stores/recoil'; const LogoutButton: FC = () => { const setUser = useSetRecoilState(userAtom); diff --git a/front-end/src/hooks/use-season-components.ts b/front-end/src/hooks/use-season-components.ts index a2645069..49a1d227 100644 --- a/front-end/src/hooks/use-season-components.ts +++ b/front-end/src/hooks/use-season-components.ts @@ -1,7 +1,7 @@ import { getSeasonKeyFromEventKey } from '@toa-lib/models'; import { useRecoilValue } from 'recoil'; import { useComponents } from 'src/seasons'; -import { currentEventKeyAtom } from 'src/stores/NewRecoil'; +import { currentEventKeyAtom } from 'src/stores/recoil'; export const useSeasonComponents = () => { const seasonKey = getSeasonKeyFromEventKey( diff --git a/front-end/src/layouts/DefaultLayout.tsx b/front-end/src/layouts/DefaultLayout.tsx index 0e9f57aa..35e7eefa 100644 --- a/front-end/src/layouts/DefaultLayout.tsx +++ b/front-end/src/layouts/DefaultLayout.tsx @@ -13,7 +13,7 @@ import IconButton from '@mui/material/IconButton'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import LoginButton from 'src/components/buttons/LoginButton/LoginButton'; -import { userAtom } from '@stores/NewRecoil'; +import { userAtom } from '@stores/recoil'; import emsAvatar from '@assets/favicon.ico'; import LogoutButton from 'src/components/buttons/LogoutButton/LogoutButton'; import NotificationsIcon from '@mui/icons-material/Notifications'; diff --git a/front-end/src/layouts/PaperLayout.tsx b/front-end/src/layouts/PaperLayout.tsx index a8f325bf..7449799f 100644 --- a/front-end/src/layouts/PaperLayout.tsx +++ b/front-end/src/layouts/PaperLayout.tsx @@ -14,7 +14,7 @@ import Paper from '@mui/material/Paper'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import LoginButton from 'src/components/buttons/LoginButton/LoginButton'; -import { userAtom } from '@stores/NewRecoil'; +import { userAtom } from '@stores/recoil'; import emsAvatar from '@assets/favicon.ico'; import LogoutButton from 'src/components/buttons/LogoutButton/LogoutButton'; diff --git a/front-end/src/layouts/RefereeLayout.tsx b/front-end/src/layouts/RefereeLayout.tsx index 3f18c489..377b1866 100644 --- a/front-end/src/layouts/RefereeLayout.tsx +++ b/front-end/src/layouts/RefereeLayout.tsx @@ -12,7 +12,7 @@ import IconButton from '@mui/material/IconButton'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import LoginButton from 'src/components/buttons/LoginButton/LoginButton'; -import { userAtom } from '@stores/NewRecoil'; +import { userAtom } from '@stores/recoil'; import emsAvatar from '@assets/favicon.ico'; import LogoutButton from 'src/components/buttons/LogoutButton/LogoutButton'; diff --git a/front-end/src/seasons/ChargedUp/referee/AutoScoreSheet.tsx b/front-end/src/seasons/ChargedUp/referee/AutoScoreSheet.tsx index cf51263e..9a029d41 100644 --- a/front-end/src/seasons/ChargedUp/referee/AutoScoreSheet.tsx +++ b/front-end/src/seasons/ChargedUp/referee/AutoScoreSheet.tsx @@ -9,7 +9,7 @@ import { } from '@toa-lib/models'; import StateToggle from 'src/components/inputs/StateToggle'; import { SetterOrUpdater, useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import NumberInput from 'src/components/inputs/NumberInput'; interface Props { @@ -22,7 +22,7 @@ const AutoScoreSheet: FC = ({ alliance, participants, onUpdate }) => { const [match, setMatch]: [ Match | null, SetterOrUpdater | null> - ] = useRecoilState(matchInProgressAtom); + ] = useRecoilState(matchOccurringAtom); if (!match || !match.details) return null; diff --git a/front-end/src/seasons/ChargedUp/referee/PenaltySheet.tsx b/front-end/src/seasons/ChargedUp/referee/PenaltySheet.tsx index 9db6e566..94720633 100644 --- a/front-end/src/seasons/ChargedUp/referee/PenaltySheet.tsx +++ b/front-end/src/seasons/ChargedUp/referee/PenaltySheet.tsx @@ -4,7 +4,7 @@ import Typography from '@mui/material/Typography'; import NumberInput from 'src/components/inputs/NumberInput'; import { Alliance, ChargedUpDetails, Match } from '@toa-lib/models'; import { useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; interface Props { alliance: Alliance; @@ -12,7 +12,7 @@ interface Props { } const PenaltySheet: FC = ({ alliance, onUpdate }) => { - const [match, setMatch] = useRecoilState(matchInProgressAtom); + const [match, setMatch] = useRecoilState(matchOccurringAtom); const handleFoulChange = (minPen: number) => { if (match) { diff --git a/front-end/src/seasons/ChargedUp/referee/ScoreSheet.tsx b/front-end/src/seasons/ChargedUp/referee/ScoreSheet.tsx index 25aaeb94..730bb4a1 100644 --- a/front-end/src/seasons/ChargedUp/referee/ScoreSheet.tsx +++ b/front-end/src/seasons/ChargedUp/referee/ScoreSheet.tsx @@ -13,7 +13,7 @@ import { import ConnectionChip from 'src/components/util/ConnectionChip/ConnectionChip'; import MatchChip from 'src/components/util/MatchChip/MatchChip'; import { useRecoilValue } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import TeamSheet from './TeamSheet'; import PenaltySheet from './PenaltySheet'; import TabPanel from 'src/components/util/TabPanel/TabPanel'; @@ -27,7 +27,7 @@ interface Props { const ScoreSheet: FC = ({ alliance }) => { const [socket] = useSocket(); - const match = useRecoilValue(matchInProgressAtom); + const match = useRecoilValue(matchOccurringAtom); const [tabIndex, setTabIndex] = useState(0); diff --git a/front-end/src/seasons/ChargedUp/referee/TeamSheet.tsx b/front-end/src/seasons/ChargedUp/referee/TeamSheet.tsx index d8df72ed..b0a477f6 100644 --- a/front-end/src/seasons/ChargedUp/referee/TeamSheet.tsx +++ b/front-end/src/seasons/ChargedUp/referee/TeamSheet.tsx @@ -3,10 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; import Box from '@mui/material/Box'; import ToggleButton from '@mui/material/ToggleButton'; import Typography from '@mui/material/Typography'; -import { - matchInProgressAtom, - matchInProgressParticipantsByStationSelectorFam -} from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import { useSocket } from 'src/api/use-socket'; import { MatchSocketEvent } from '@toa-lib/models'; @@ -16,7 +13,7 @@ interface Props { const TeamSheet: FC = ({ station }) => { const [socket] = useSocket(); - const match = useRecoilValue(matchInProgressAtom); + const match = useRecoilValue(matchOccurringAtom); const [participant, setParticipant] = useRecoilState( matchInProgressParticipantsByStationSelectorFam(station) ); diff --git a/front-end/src/seasons/ChargedUp/referee/TeleOpScoreSheet.tsx b/front-end/src/seasons/ChargedUp/referee/TeleOpScoreSheet.tsx index e3d84c9c..d9051073 100644 --- a/front-end/src/seasons/ChargedUp/referee/TeleOpScoreSheet.tsx +++ b/front-end/src/seasons/ChargedUp/referee/TeleOpScoreSheet.tsx @@ -9,7 +9,7 @@ import { } from '@toa-lib/models'; import StateToggle from 'src/components/inputs/StateToggle'; import { SetterOrUpdater, useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import NumberInput from 'src/components/inputs/NumberInput'; interface Props { @@ -22,7 +22,7 @@ const TeleScoreSheet: FC = ({ alliance, participants, onUpdate }) => { const [match, setMatch]: [ Match | null, SetterOrUpdater | null> - ] = useRecoilState(matchInProgressAtom); + ] = useRecoilState(matchOccurringAtom); if (!match || !match.details) return null; diff --git a/front-end/src/seasons/Crescendo/referee/AutoScoreSheet.tsx b/front-end/src/seasons/Crescendo/referee/AutoScoreSheet.tsx index 55d01737..bb61982f 100644 --- a/front-end/src/seasons/Crescendo/referee/AutoScoreSheet.tsx +++ b/front-end/src/seasons/Crescendo/referee/AutoScoreSheet.tsx @@ -4,7 +4,7 @@ import Typography from '@mui/material/Typography'; import { Alliance, Crescendo, Match, MatchParticipant } from '@toa-lib/models'; import StateToggle from 'src/components/inputs/StateToggle'; import { SetterOrUpdater, useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import NumberInput from 'src/components/inputs/NumberInput'; interface Props { @@ -17,7 +17,7 @@ const AutoScoreSheet: FC = ({ alliance, participants, onUpdate }) => { const [match, setMatch]: [ Match | null, SetterOrUpdater | null> - ] = useRecoilState(matchInProgressAtom); + ] = useRecoilState(matchOccurringAtom); if (!match || !match.details) return null; diff --git a/front-end/src/seasons/Crescendo/referee/PenaltySheet.tsx b/front-end/src/seasons/Crescendo/referee/PenaltySheet.tsx index 99a15952..019d4ffd 100644 --- a/front-end/src/seasons/Crescendo/referee/PenaltySheet.tsx +++ b/front-end/src/seasons/Crescendo/referee/PenaltySheet.tsx @@ -4,7 +4,7 @@ import Typography from '@mui/material/Typography'; import NumberInput from 'src/components/inputs/NumberInput'; import { Alliance, Crescendo, Match } from '@toa-lib/models'; import { useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; interface Props { alliance: Alliance; @@ -12,7 +12,7 @@ interface Props { } const PenaltySheet: FC = ({ alliance, onUpdate }) => { - const [match, setMatch] = useRecoilState(matchInProgressAtom); + const [match, setMatch] = useRecoilState(matchOccurringAtom); const handleFoulChange = (minPen: number) => { if (minPen < 0) minPen = 0; diff --git a/front-end/src/seasons/Crescendo/referee/ScoreSheet.tsx b/front-end/src/seasons/Crescendo/referee/ScoreSheet.tsx index 8723798f..d0167026 100644 --- a/front-end/src/seasons/Crescendo/referee/ScoreSheet.tsx +++ b/front-end/src/seasons/Crescendo/referee/ScoreSheet.tsx @@ -8,7 +8,7 @@ import { Alliance, Crescendo, Match, MatchSocketEvent } from '@toa-lib/models'; import ConnectionChip from 'src/components/util/ConnectionChip/ConnectionChip'; import MatchChip from 'src/components/util/MatchChip/MatchChip'; import { useRecoilValue } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import TeamSheet from './TeamSheet'; import PenaltySheet from './PenaltySheet'; import TabPanel from 'src/components/util/TabPanel/TabPanel'; @@ -22,7 +22,7 @@ interface Props { const ScoreSheet: FC = ({ alliance }) => { const [socket] = useSocket(); - const match = useRecoilValue(matchInProgressAtom); + const match = useRecoilValue(matchOccurringAtom); const [tabIndex, setTabIndex] = useState(0); diff --git a/front-end/src/seasons/Crescendo/referee/TeamSheet.tsx b/front-end/src/seasons/Crescendo/referee/TeamSheet.tsx index d8df72ed..b0a477f6 100644 --- a/front-end/src/seasons/Crescendo/referee/TeamSheet.tsx +++ b/front-end/src/seasons/Crescendo/referee/TeamSheet.tsx @@ -3,10 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; import Box from '@mui/material/Box'; import ToggleButton from '@mui/material/ToggleButton'; import Typography from '@mui/material/Typography'; -import { - matchInProgressAtom, - matchInProgressParticipantsByStationSelectorFam -} from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import { useSocket } from 'src/api/use-socket'; import { MatchSocketEvent } from '@toa-lib/models'; @@ -16,7 +13,7 @@ interface Props { const TeamSheet: FC = ({ station }) => { const [socket] = useSocket(); - const match = useRecoilValue(matchInProgressAtom); + const match = useRecoilValue(matchOccurringAtom); const [participant, setParticipant] = useRecoilState( matchInProgressParticipantsByStationSelectorFam(station) ); diff --git a/front-end/src/seasons/Crescendo/referee/TeleOpScoreSheet.tsx b/front-end/src/seasons/Crescendo/referee/TeleOpScoreSheet.tsx index df3d321c..798db535 100644 --- a/front-end/src/seasons/Crescendo/referee/TeleOpScoreSheet.tsx +++ b/front-end/src/seasons/Crescendo/referee/TeleOpScoreSheet.tsx @@ -19,10 +19,10 @@ import { } from 'recoil'; import { blueBonusActiveAtom, - matchInProgressAtom, + matchOccurringAtom, matchStateAtom, redBonusActiveAtom -} from '@stores/NewRecoil'; +} from '@stores/recoil'; import NumberInput from 'src/components/inputs/NumberInput'; import { useSocket } from 'src/api/use-socket'; @@ -36,7 +36,7 @@ const TeleScoreSheet: FC = ({ alliance, participants, onUpdate }) => { const [match, setMatch]: [ Match | null, SetterOrUpdater | null> - ] = useRecoilState(matchInProgressAtom); + ] = useRecoilState(matchOccurringAtom); const matchState = useRecoilValue(matchStateAtom); const [socket, connected] = useSocket(); diff --git a/front-end/src/seasons/HydrogenHorizons/referee/PenaltySheet.tsx b/front-end/src/seasons/HydrogenHorizons/referee/PenaltySheet.tsx index d46b12ee..7d349631 100644 --- a/front-end/src/seasons/HydrogenHorizons/referee/PenaltySheet.tsx +++ b/front-end/src/seasons/HydrogenHorizons/referee/PenaltySheet.tsx @@ -4,7 +4,7 @@ import Typography from '@mui/material/Typography'; import NumberInput from 'src/components/inputs/NumberInput'; import { Alliance, HydrogenHorizons, Match } from '@toa-lib/models'; import { useRecoilValue } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; interface Props { alliance: Alliance; @@ -15,7 +15,7 @@ interface Props { } const PenaltySheet: FC = ({ alliance, onMatchItemUpdate }) => { - const match = useRecoilValue(matchInProgressAtom); + const match = useRecoilValue(matchOccurringAtom); const handleFoulChange = (minPen: number) => { onMatchItemUpdate(alliance === 'red' ? 'redMinPen' : 'blueMinPen', minPen); diff --git a/front-end/src/seasons/HydrogenHorizons/referee/ScoreSheet.tsx b/front-end/src/seasons/HydrogenHorizons/referee/ScoreSheet.tsx index 46b2fc43..7f49f86a 100644 --- a/front-end/src/seasons/HydrogenHorizons/referee/ScoreSheet.tsx +++ b/front-end/src/seasons/HydrogenHorizons/referee/ScoreSheet.tsx @@ -2,7 +2,7 @@ import { FC, SyntheticEvent, useState } from 'react'; import { RefereeScoreSheetProps } from '@seasons/index'; import { useSocket } from 'src/api/use-socket'; import { SetterOrUpdater, useRecoilState } from 'recoil'; -import { matchInProgressAtom } from '@stores/NewRecoil'; +import { matchOccurringAtom } from '@stores/recoil'; import { HydrogenHorizons, Match, @@ -27,7 +27,7 @@ const ScoreSheet: FC = ({ alliance }) => { const [match, setMatch]: [ Match | null, SetterOrUpdater | null> - ] = useRecoilState(matchInProgressAtom); + ] = useRecoilState(matchOccurringAtom); const [tabIndex, setTabIndex] = useState(0); diff --git a/front-end/src/seasons/HydrogenHorizons/referee/TeamSheet.tsx b/front-end/src/seasons/HydrogenHorizons/referee/TeamSheet.tsx index 4a776383..da697406 100644 --- a/front-end/src/seasons/HydrogenHorizons/referee/TeamSheet.tsx +++ b/front-end/src/seasons/HydrogenHorizons/referee/TeamSheet.tsx @@ -3,7 +3,6 @@ import { useRecoilState } from 'recoil'; import Box from '@mui/material/Box'; import ToggleButton from '@mui/material/ToggleButton'; import Typography from '@mui/material/Typography'; -import { matchInProgressParticipantsByStationSelectorFam } from '@stores/NewRecoil'; import { CardStatusUpdate, MatchSocketEvent } from '@toa-lib/models'; import { useSocket } from 'src/api/use-socket'; import { useTeamIdentifiers } from 'src/hooks/use-team-identifier'; diff --git a/front-end/src/seasons/HydrogenHorizons/referee/TeleOpScoreSheet.tsx b/front-end/src/seasons/HydrogenHorizons/referee/TeleOpScoreSheet.tsx index 376a9c5c..3fa8c620 100644 --- a/front-end/src/seasons/HydrogenHorizons/referee/TeleOpScoreSheet.tsx +++ b/front-end/src/seasons/HydrogenHorizons/referee/TeleOpScoreSheet.tsx @@ -9,16 +9,14 @@ import { } from '@toa-lib/models'; import StateToggle from 'src/components/inputs/StateToggle'; import { useRecoilValue } from 'recoil'; -import { - currentTeamsByEventSelector, - matchInProgressAtom -} from '@stores/NewRecoil'; import NumberInput from 'src/components/inputs/NumberInput'; import { AlignmentStatus, Proficiency } from '@toa-lib/models/build/seasons/HydrogenHorizons'; import { useTeamIdentifiers } from 'src/hooks/use-team-identifier'; +import { matchOccurringAtom } from 'src/stores/recoil'; +import { useTeamsForEvent } from 'src/api/use-team-data'; interface Props { alliance: Alliance; @@ -40,8 +38,8 @@ const TeleScoreSheet: FC = ({ onMatchDetailsUpdate }) => { const match: Match | null = - useRecoilValue(matchInProgressAtom); - const teams = useRecoilValue(currentTeamsByEventSelector); + useRecoilValue(matchOccurringAtom); + const { data: teams } = useTeamsForEvent(match?.eventKey ?? ''); const identifiers = useTeamIdentifiers(); if (!match || !match.details) return null; @@ -193,7 +191,7 @@ const TeleScoreSheet: FC = ({ /> {participants?.map((p) => { - const team = teams.find((t) => t.teamKey === p.teamKey); + const team = teams?.find((t) => t.teamKey === p.teamKey); const update = (value: Proficiency) => { updateProficiency(p.station, value); };