mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: cleanup store (#727)
* refactor: isolate clock * refactor: isolate private * refactor: remove duplicate * chore: rename loaded > runtime * fix: handle no events loaded
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import MultiPartProgressBar from '../../../common/components/multi-part-progress-bar/MultiPartProgressBar';
|
||||
import { useTimer } from '../../../common/hooks/useSocket';
|
||||
import { useProgressData } from '../../../common/hooks/useSocket';
|
||||
import useViewSettings from '../../../common/hooks-query/useViewSettings';
|
||||
|
||||
import styles from './CuesheetProgress.module.scss';
|
||||
|
||||
export default function CuesheetProgress() {
|
||||
const { data } = useViewSettings();
|
||||
const timer = useTimer();
|
||||
const totalTime = (timer.duration ?? 0) + (timer.addedTime ?? 0);
|
||||
const { addedTime, current, duration, timeWarning, timeDanger } = useProgressData();
|
||||
const totalTime = (duration ?? 0) + (addedTime ?? 0);
|
||||
|
||||
return (
|
||||
<MultiPartProgressBar
|
||||
now={timer.current}
|
||||
now={current}
|
||||
complete={totalTime}
|
||||
normalColor={data!.normalColor}
|
||||
warning={timer.timeWarning}
|
||||
warning={timeWarning}
|
||||
warningColor={data!.warningColor}
|
||||
danger={timer.timeDanger}
|
||||
danger={timeDanger}
|
||||
dangerColor={data!.dangerColor}
|
||||
className={styles.progressOverride}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user