Feat: Translate the splitter operator field #9869 (#10166)

### What problem does this PR solve?

Feat: Translate the splitter operator field #9869

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-19 11:11:22 +08:00
committed by GitHub
parent a1b947ffd6
commit 4fae40f66a
85 changed files with 146 additions and 6442 deletions

View File

@ -11,7 +11,6 @@ import {
PropsWithChildren,
useCallback,
} from 'react';
import { Operator } from '../../constant';
import { useDuplicateNode } from '../../hooks';
import useGraphStore from '../../store';
@ -38,20 +37,13 @@ export function ToolBar({
showRun = true,
}: ToolBarProps) {
const deleteNodeById = useGraphStore((store) => store.deleteNodeById);
const deleteIterationNodeById = useGraphStore(
(store) => store.deleteIterationNodeById,
);
const deleteNode: MouseEventHandler<HTMLDivElement> = useCallback(
(e) => {
e.stopPropagation();
if (label === Operator.Iteration) {
deleteIterationNodeById(id);
} else {
deleteNodeById(id);
}
deleteNodeById(id);
},
[deleteIterationNodeById, deleteNodeById, id, label],
[deleteNodeById, id],
);
const duplicateNode = useDuplicateNode();