Skip to content

🎥 Make videos programmatically with React

Fix lint errors in Composition and MenuBuildIndicator

Jonny Burger6e00278d8736
diff --git a/packages/core/src/Composition.tsx b/packages/core/src/Composition.tsx
index 63ed3ea01a..7702bf61bf 100644
--- a/packages/core/src/Composition.tsx
+++ b/packages/core/src/Composition.tsx
@@ -136,7 +136,7 @@ const InnerComposition = <
defaultProps,
schema,
...compProps
-}: CompositionProps<Schema, Props> & {stack?: string}) => {
+}: CompositionProps<Schema, Props> & {readonly stack?: string}) => {
const compManager = useContext(CompositionSetters);
const {registerComposition, unregisterComposition} = compManager;
@@ -176,6 +176,7 @@ const InnerComposition = <
}
const {folderName, parentName} = useContext(FolderContext);
+ const stack = (compProps as {stack?: string}).stack ?? null;
useEffect(() => {
// Ensure it's a URL safe id
@@ -200,7 +201,7 @@ const InnerComposition = <
parentFolderName: parentName,
schema: schema ?? null,
calculateMetadata: compProps.calculateMetadata ?? null,
- stack: (compProps as {stack?: string}).stack ?? null,
+ stack,
} as TComposition<Schema, Props>);
return () => {
@@ -219,6 +220,7 @@ const InnerComposition = <
parentName,
schema,
compProps.calculateMetadata,
+ stack,
registerComposition,
unregisterComposition,
]);
diff --git a/packages/studio/src/components/MenuBuildIndicator.tsx b/packages/studio/src/components/MenuBuildIndicator.tsx
index edbcfea9e2..943459b14e 100644
--- a/packages/studio/src/components/MenuBuildIndicator.tsx
+++ b/packages/studio/src/components/MenuBuildIndicator.tsx
@@ -62,7 +62,7 @@ export const MenuBuildIndicator: React.FC = () => {
const ctx = useContext(StudioServerConnectionCtx).previewServerState;
const showEditorLink = window.remotion_editorName && ctx.type === 'connected';
- const showGitLink = !showEditorLink && !!window.remotion_gitSource;
+ const showGitLink = !showEditorLink && Boolean(window.remotion_gitSource);
const handleProjectNameClick = useCallback(async () => {
if (showEditorLink) {