diff options
Diffstat (limited to 'apps/web/src')
| -rw-r--r-- | apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts b/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts index 95f338e1..a900cb13 100644 --- a/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts +++ b/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts @@ -9,8 +9,7 @@ export function useElementPlayhead({ startTime: number;
duration: number;
}) {
- const editor = useEditor();
- const playheadTime = editor.playback.getCurrentTime();
+ const playheadTime = useEditor((editor) => editor.playback.getCurrentTime());
const localTime = getElementLocalTime({
timelineTime: playheadTime,
elementStartTime: startTime,
|
