From 6dd0a045957c56d0974c0d31e869650f69f99b58 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:19:18 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../addNewVariableButton.tsx | 4 +++- .../src/modals/editNodeModal/index.tsx | 2 +- src/frontend/src/types/components/index.ts | 24 +++++++++++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 81ab16556367..4dcda2deb9dc 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -29,7 +29,9 @@ export default function AddNewVariableButton({ const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields) ?? {}), + Object.keys( + useGlobalVariablesStore((state) => state.unavaliableFields) ?? {}, + ), ); const availableFields = () => { diff --git a/src/frontend/src/modals/editNodeModal/index.tsx b/src/frontend/src/modals/editNodeModal/index.tsx index 34ef8613b34f..dd95087be7a0 100644 --- a/src/frontend/src/modals/editNodeModal/index.tsx +++ b/src/frontend/src/modals/editNodeModal/index.tsx @@ -38,7 +38,7 @@ const EditNodeModal = forwardRef( const handleOnNewValue = (newValue: any, key: string, setDb?: boolean) => { myData.current.node!.template[key].value = newValue; - if(setDb){ + if (setDb) { myData.current.node!.template[key].load_from_db = newValue; } }; diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index cc1a1cc2116b..7c5c60579f00 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -123,7 +123,11 @@ export type TextAreaComponentType = { nodeClass?: APIClassType; setNodeClass?: (value: APIClassType) => void; disabled: boolean; - onChange: (value: string[] | string, dbValue?: boolean, skipSnapshot?: boolean) => void; + onChange: ( + value: string[] | string, + dbValue?: boolean, + skipSnapshot?: boolean, + ) => void; value: string; editNode?: boolean; id?: string; @@ -145,7 +149,11 @@ export type PromptAreaComponentType = { nodeClass?: APIClassType; setNodeClass?: (value: APIClassType, code?: string) => void; disabled: boolean; - onChange: (value: string[] | string, dbValue?: boolean, skipSnapshot?: boolean) => void; + onChange: ( + value: string[] | string, + dbValue?: boolean, + skipSnapshot?: boolean, + ) => void; value: string; readonly?: boolean; editNode?: boolean; @@ -155,7 +163,11 @@ export type PromptAreaComponentType = { export type CodeAreaComponentType = { setOpenModal?: (bool: boolean) => void; disabled: boolean; - onChange: (value: string[] | string, dbValue?: boolean, skipSnapshot?: boolean) => void; + onChange: ( + value: string[] | string, + dbValue?: boolean, + skipSnapshot?: boolean, + ) => void; value: string; editNode?: boolean; nodeClass?: APIClassType; @@ -170,7 +182,11 @@ export type CodeAreaComponentType = { export type FileComponentType = { IOInputProps?; disabled: boolean; - onChange: (value: string[] | string, dbValue?: boolean, skipSnapshot?: boolean) => void; + onChange: ( + value: string[] | string, + dbValue?: boolean, + skipSnapshot?: boolean, + ) => void; value: string; fileTypes: Array; onFileChange: (value: string) => void;