From ac4b322c8879d2c578cfca76151c71217d5eaf02 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 3 Jul 2023 23:27:27 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20refactor(parameterComponent):=20?= =?UTF-8?q?improve=20code=20formatting=20and=20indentation=20for=20better?= =?UTF-8?q?=20readability=20The=20unused=20import=20of=20the=20lodash=20li?= =?UTF-8?q?brary=20has=20been=20removed=20to=20clean=20up=20the=20code=20a?= =?UTF-8?q?nd=20reduce=20unnecessary=20dependencies.=20The=20code=20format?= =?UTF-8?q?ting=20and=20indentation=20have=20also=20been=20improved=20to?= =?UTF-8?q?=20enhance=20readability=20and=20maintain=20consistency=20throu?= =?UTF-8?q?ghout=20the=20file.=20=F0=9F=94=A5=20refactor(parameterComponen?= =?UTF-8?q?t):=20remove=20unused=20import=20of=20lodash=20library?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/parameterComponent/index.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index ec878d230..fca53e1ef 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -25,7 +25,6 @@ import { nodeColors } from "../../../../utils"; import ShadTooltip from "../../../../components/ShadTooltipComponent"; import { PopUpContext } from "../../../../contexts/popUpContext"; import ToggleShadComponent from "../../../../components/toggleShadComponent"; -import * as _ from "lodash"; import { Info } from "lucide-react"; export default function ParameterComponent({ @@ -261,10 +260,10 @@ export default function ParameterComponent({ ) : left === true && type === "code" ? (
{ - data.node = nodeClass; - }} - nodeClass={data.node} + setNodeClass={(nodeClass) => { + data.node = nodeClass; + }} + nodeClass={data.node} disabled={disabled} value={data.node.template[name].value ?? ""} onChange={handleOnNewValue} @@ -296,10 +295,11 @@ export default function ParameterComponent({ ) : left === true && type === "prompt" ? (
{ - data.node = nodeClass; - }} - nodeClass={data.node} + field_name={name} + setNodeClass={(nodeClass) => { + data.node = nodeClass; + }} + nodeClass={data.node} disabled={disabled} value={data.node.template[name].value ?? ""} onChange={handleOnNewValue}