From 41d3fbcc2a95c758e376b2a5d8b9a16d512e98e5 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 4 Dec 2024 11:16:09 -0300 Subject: [PATCH] fix: use cn utility for className assignment (#5032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 📝 (NodeName/index.tsx): refactor className logic to use cn() function for better readability and maintainability --- .../GenericNode/components/NodeName/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeName/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeName/index.tsx index b27b50496..15bafebf7 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeName/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeName/index.tsx @@ -76,11 +76,10 @@ export default function NodeName({ event.preventDefault(); }} data-testid={"title-" + display_name} - className={ - showNode - ? "nodoubleclick w-full cursor-text truncate font-medium text-primary" - : "cursor-default" - } + className={cn( + "nodoubleclick w-full truncate font-medium text-primary", + showNode ? "cursor-text" : "cursor-default", + )} >