mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 07:29:08 +00:00
14 lines
514 B
TypeScript
14 lines
514 B
TypeScript
import { useAnimatedProgress } from '../../../../common/hooks/useAnimatedProgress';
|
|
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, eventId);
|
|
|
|
return <div className={style.progressBar} style={{ width: `${progress}%` }} />;
|
|
}
|