Skip to content

🎥 Make videos programmatically with React

make still dependent on resolved config

Jonny Burgerc4078aab2e44
diff --git a/packages/cli/src/editor/helpers/is-current-selected-still.ts b/packages/cli/src/editor/helpers/is-current-selected-still.ts
index 9a5f7e40d5..98954d3c1e 100644
--- a/packages/cli/src/editor/helpers/is-current-selected-still.ts
+++ b/packages/cli/src/editor/helpers/is-current-selected-still.ts
@@ -3,19 +3,13 @@ import {Internals} from 'remotion';
import {isCompositionStill} from './is-composition-still';
export const useIsStill = () => {
- const {compositions, currentComposition} = useContext(
- Internals.CompositionManager
- );
+ const {resolved} = useContext(Internals.CompositionManager);
- const selected = useMemo(
- () => compositions.find((c) => c.id === currentComposition),
- [compositions, currentComposition]
- );
- if (!selected) {
+ if (!resolved) {
return false;
}
- return isCompositionStill(selected);
+ return isCompositionStill(resolved);
};
export const useDimensions = () => {