Skip to content

🎥 Make videos programmatically with React

Merge branch 'v4' into custom-date-warning

Jonny Burgere19e97f52e0e
diff --cc packages/cli/src/editor/components/RenderModal/RenderModalData.tsx
index c186602e61,4f8738fa4f..0ce16658ba
--- a/packages/cli/src/editor/components/RenderModal/RenderModalData.tsx
+++ b/packages/cli/src/editor/components/RenderModal/RenderModalData.tsx
@@@ -89,10 -92,18 +92,19 @@@ export const RenderModalData: React.FC<
setInputProps: React.Dispatch<React.SetStateAction<unknown>>;
compact: boolean;
mayShowSaveButton: boolean;
- }> = ({composition, inputProps, setInputProps, compact, mayShowSaveButton}) => {
+ propsEditType: PropsEditType;
+ }> = ({
+ composition,
+ inputProps,
+ setInputProps,
+ compact,
+ mayShowSaveButton,
+ propsEditType,
+ }) => {
const [mode, setMode] = useState<Mode>('schema');
const [valBeforeSafe, setValBeforeSafe] = useState<unknown>(inputProps);
+ const [isCustomDateUsed, setIsCustomDateUsed] = useState<boolean>();
+ const [saving, setSaving] = useState(false);
const zodValidationResult = useMemo(() => {
return composition.schema.safeParse(inputProps);
}, [composition.schema, inputProps]);
@@@ -189,10 -213,9 +214,11 @@@
return getRenderModalWarnings({
canSaveDefaultProps,
cliProps,
+ isCustomDateUsed,
+ inJSONEditor: mode === 'json',
+ propsEditType,
});
- }, [canSaveDefaultProps, cliProps, isCustomDateUsed, mode]);
- }, [canSaveDefaultProps, cliProps, propsEditType]);
++ }, [canSaveDefaultProps, cliProps, isCustomDateUsed, mode, propsEditType]);
if (connectionStatus === 'disconnected') {
return (
diff --cc packages/cli/src/editor/components/RenderModal/get-render-modal-warnings.ts
index daf2220d21,3b2f934e21..6481615f22
--- a/packages/cli/src/editor/components/RenderModal/get-render-modal-warnings.ts
+++ b/packages/cli/src/editor/components/RenderModal/get-render-modal-warnings.ts
@@@ -41,17 -47,14 +51,19 @@@ const customDateUsed = (used: boolean
export const getRenderModalWarnings = ({
cliProps,
canSaveDefaultProps,
+ isCustomDateUsed,
+ inJSONEditor,
+ propsEditType,
}: {
cliProps: unknown;
canSaveDefaultProps: TypeCanSaveState;
+ isCustomDateUsed: boolean | undefined;
+ inJSONEditor: boolean;
+ propsEditType: PropsEditType;
}) => {
return [
- getInputPropsWarning(cliProps),
+ getInputPropsWarning({cliProps, propsEditType}),
- getCannotSaveDefaultProps({canSaveDefaultProps}),
+ getCannotSaveDefaultProps(canSaveDefaultProps),
+ customDateUsed(isCustomDateUsed, inJSONEditor),
].filter(truthy);
};