From 2f8a10639bc3d728efaae897d3959759a527154e Mon Sep 17 00:00:00 2001
From: ali asaria <aliasaria@users.noreply.github.com>
Date: Thu, 27 Feb 2025 09:26:36 -0500
Subject: [PATCH] move custom node to memo

---
 .../components/Experiment/Workflows/CustomNode.tsx   | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/renderer/components/Experiment/Workflows/CustomNode.tsx b/src/renderer/components/Experiment/Workflows/CustomNode.tsx
index b9a5161c..cd6b5041 100644
--- a/src/renderer/components/Experiment/Workflows/CustomNode.tsx
+++ b/src/renderer/components/Experiment/Workflows/CustomNode.tsx
@@ -1,8 +1,9 @@
+import { Typography } from '@mui/joy';
 import { BuiltInNode, Handle } from '@xyflow/react';
 import { NodeProps, Position } from '@xyflow/system';
-import { CircleXIcon, SquareXIcon, XIcon } from 'lucide-react';
+import { XIcon } from 'lucide-react';
 
-export default function CustomNode({
+export default function memo({
   data,
   isConnectable,
   targetPosition = Position.Top,
@@ -17,6 +18,9 @@ export default function CustomNode({
           cursor: 'pointer',
           borderRadius: '50%',
         }}
+        onClick={() => {
+          alert('delete node');
+        }}
       >
         <XIcon size="12px" />
       </div>
@@ -25,7 +29,9 @@ export default function CustomNode({
         position={targetPosition}
         isConnectable={isConnectable}
       />
-      {data?.label}
+      <Typography level="title-sm">{data?.label}</Typography>
+      <Typography level="body-sm">{data?.jobType}</Typography>
+      <Typography level="body-sm">{data?.template}</Typography>
       <Handle
         type="source"
         position={sourcePosition}
-- 
GitLab