mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 20:09:11 +00:00
refactor(progress bar): reset when event changes
This commit is contained in:
committed by
Carlos Valente
parent
24be49ef66
commit
fb559ed9da
+3
-2
@@ -1,12 +1,13 @@
|
||||
import { useAnimatedProgress } from '../../../../common/hooks/useAnimatedProgress';
|
||||
import { useTimer } from '../../../../common/hooks/useSocket';
|
||||
import { useSelectedEventId, useTimer } from '../../../../common/hooks/useSocket';
|
||||
|
||||
import style from './RundownEventProgressBar.module.scss';
|
||||
|
||||
export default function RundownEventProgressBar() {
|
||||
const timer = useTimer();
|
||||
const eventId = useSelectedEventId();
|
||||
|
||||
const progress = useAnimatedProgress(timer.current, timer.duration);
|
||||
const progress = useAnimatedProgress(timer.current, timer.duration, eventId);
|
||||
|
||||
return <div className={style.progressBar} style={{ width: `${progress}%` }} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user