diff --git a/src/components/ItemControls/NodeControls/NodeControls.tsx b/src/components/ItemControls/NodeControls/NodeControls.tsx index db1f8a2a..eb783e09 100644 --- a/src/components/ItemControls/NodeControls/NodeControls.tsx +++ b/src/components/ItemControls/NodeControls/NodeControls.tsx @@ -28,7 +28,7 @@ type Mode = keyof typeof ModeOptions; export const NodeControls = ({ id }: Props) => { const [mode, setMode] = useState('SETTINGS'); - const { updateModelItem, updateViewItem, deleteViewItem } = useScene(); + const { updateModelItem, updateViewItem, deleteViewItem, duplicateViewItem } = useScene(); const uiStateActions = useUiStateStore((state) => { return state.actions; }); @@ -101,6 +101,9 @@ export const NodeControls = ({ id }: Props) => { uiStateActions.setItemControls(null); deleteViewItem(viewItem.id); }} + onDuplicated={() => { + duplicateViewItem(viewItem); + }} /> )} {mode === 'CHANGE_ICON' && (