Skip to content

Commit

Permalink
perf code
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jul 9, 2024
1 parent 14ac761 commit 8d8b355
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ const NodeCard = (props: Props) => {
minW = '300px',
maxW = '600px',
nodeId,
flowNodeType,
selected,
menuForbid,
isTool = false,
isError = false,
debugResult,
pluginId
debugResult
} = props;

const nodeList = useContextSelector(WorkflowContext, (v) => v.nodeList);
Expand Down Expand Up @@ -196,12 +194,7 @@ const NodeCard = (props: Props) => {
</MyTooltip>
)}
</Flex>
<MenuRender
nodeId={nodeId}
pluginId={pluginId}
flowNodeType={flowNodeType}
menuForbid={menuForbid}
/>
<MenuRender nodeId={nodeId} menuForbid={menuForbid} />
<NodeIntro nodeId={nodeId} intro={intro} />
</Box>
<ConfirmSyncModal />
Expand All @@ -218,8 +211,6 @@ const NodeCard = (props: Props) => {
appT,
onOpenConfirmSync,
onClickSyncVersion,
pluginId,
flowNodeType,
intro,
ConfirmSyncModal,
onOpenCustomTitleModal,
Expand Down Expand Up @@ -273,13 +264,9 @@ export default React.memo(NodeCard);

const MenuRender = React.memo(function MenuRender({
nodeId,
pluginId,
flowNodeType,
menuForbid
}: {
nodeId: string;
pluginId?: string;
flowNodeType: Props['flowNodeType'];
menuForbid?: Props['menuForbid'];
}) {
const { t } = useTranslation();
Expand Down

0 comments on commit 8d8b355

Please sign in to comment.