Skip to content

Commit

Permalink
cleaned out use of old atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn committed Apr 14, 2024
1 parent 73291d0 commit a460252
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 1,359 deletions.
4 changes: 2 additions & 2 deletions front-end/src/api/use-socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
currentTournamentFieldsAtom,
followerModeEnabledAtom,
leaderApiHostAtom,
socketConnectedAtom,
displayChromaKeyAtom
socketConnectedAtom
} from 'src/stores/NewRecoil';
import { displayChromaKeyAtom } from 'src/stores/recoil';
import { useSnackbar } from 'src/hooks/use-snackbar';
import { connectSocketClient } from './use-socket-data';

Expand Down
3 changes: 2 additions & 1 deletion front-end/src/apps/audience-display/audience-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { SyncMatchStateToRecoil } from 'src/components/sync-effects/sync-match-s
import { SyncOnPrestart } from 'src/components/sync-effects/sync-on-prestart';
import { SyncOnCommit } from 'src/components/sync-effects/sync-on-commit';
import ChromaLayout from 'src/layouts/ChromaLayout';
import { currentEventKeyAtom, displayIdAtom } from 'src/stores/NewRecoil';
import { currentEventKeyAtom } from 'src/stores/NewRecoil';
import { DisplaySwitcher } from './displays';
import { displayIdAtom } from 'src/stores/recoil';

export const AudienceDisplay: FC = () => {
const eventKey = useRecoilValue(currentEventKeyAtom);
Expand Down
8 changes: 5 additions & 3 deletions front-end/src/apps/reports/components/report-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import Box from '@mui/material/Box';
import Divider from '@mui/material/Divider';
import Typography from '@mui/material/Typography';
import { useRecoilValue } from 'recoil';
import { currentEventSelector } from 'src/stores/NewRecoil';
import { currentEventKeyAtom } from 'src/stores/NewRecoil';
import { useEvent } from 'src/api/use-event-data';

interface Props {
name: string;
Expand All @@ -12,7 +13,8 @@ interface Props {
}

export const Report: FC<Props> = ({ name, children, pagebreak }) => {
const eventName = useRecoilValue(currentEventSelector)?.eventName;
const eventKey = useRecoilValue(currentEventKeyAtom);
const { data: event } = useEvent(eventKey);

return (
<Box
Expand All @@ -22,7 +24,7 @@ export const Report: FC<Props> = ({ name, children, pagebreak }) => {
}}
>
<Typography align='center' variant='h4'>
{eventName}
{event?.eventName ?? ''}
</Typography>
<Typography align='center' variant='h5'>
{name}
Expand Down
242 changes: 0 additions & 242 deletions front-end/src/components/forms/EventForm/EventForm.tsx

This file was deleted.

Loading

0 comments on commit a460252

Please sign in to comment.