Skip to content

Commit

Permalink
converted jbapp
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn committed Apr 5, 2024
1 parent 16c8b04 commit 1782896
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion front-end/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const AdminApp = lazy(() =>
import('./apps/admin').then((m) => ({ default: m.AdminApp }))
);

// Silly Routes
const JBApp = lazy(() =>
import('./apps/jb-app').then((m) => ({ default: m.JBApp }))
);

const SettingsApp = lazy(() => import('./apps/Settings'));
const GlobalSettingsApp = lazy(() => import('./apps/Settings/GlobalSettings'));

Expand All @@ -56,7 +61,6 @@ const HeadReferee = lazy(() => import('./apps/Referee/HeadReferee'));
const Reports = lazy(() => import('./apps/Reports'));
const FrcFmsFieldMonitorApp = lazy(() => import('./apps/FrcFmsFieldMonitor'));
const QueueingDisplay = lazy(() => import('./apps/QueueingDisplay'));
const JBApp = lazy(() => import('./apps/JBApp'));
const Streaming = lazy(() => import('./apps/Streaming/Streaming'));
const AudienceDisplayManager = lazy(
() => import('./apps/AudienceDisplayManager')
Expand Down
3 changes: 0 additions & 3 deletions front-end/src/apps/JBApp/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions front-end/src/apps/jb-app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { JBApp } from './jb-app';

export { JBApp };
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { FC, useState, useEffect } from 'react';
import { DateTime } from 'luxon';
import './JBApp.less';
import ChromaLayout from 'src/layouts/ChromaLayout';
import PrestartListener from 'src/components/sync-effects/PrestartListener/PrestartListener';
import MatchUpdateListener from 'src/components/sync-effects/MatchUpdateListener/MatchUpdateListener';
import { useRecoilValue } from 'recoil';
import MatchCountdown from 'src/components/util/MatchCountdown/MatchCountdown';
import { matchInProgressAtom } from 'src/stores/NewRecoil';
import { MatchTimer } from 'src/components/util/match-timer';
import { matchOccurringAtom } from 'src/stores/recoil';
import { SyncMatchOccurringToRecoil } from 'src/components/sync-effects/sync-match-occurring-to-recoil';
import { SyncOnPrestart } from 'src/components/sync-effects/sync-on-prestart';

const JBApp: FC = () => {
const match = useRecoilValue(matchInProgressAtom);
export const JBApp: FC = () => {
const match = useRecoilValue(matchOccurringAtom);
const [time, setTime] = useState<DateTime>(DateTime.now());

const redScore = match?.redScore || 0;
Expand All @@ -27,13 +27,13 @@ const JBApp: FC = () => {

return (
<ChromaLayout>
<PrestartListener />
<MatchUpdateListener />
<SyncMatchOccurringToRecoil />
<SyncOnPrestart />
<div className='jb-container'>
<div>{time.toFormat('ttt')}</div>
<div>{match?.name}</div>
<div>
<MatchCountdown />
<MatchTimer />
</div>
<div className='jb-scores'>
<div className={`red ${redScore > blueScore ? 'winning' : ''}`}>
Expand Down

0 comments on commit 1782896

Please sign in to comment.