Skip to content

Commit

Permalink
feat: NodeControls uses duplicateViewItem
Browse files Browse the repository at this point in the history
  • Loading branch information
nomorepanic committed Sep 16, 2024
1 parent e96cd4a commit 9005631
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ItemControls/NodeControls/NodeControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Mode = keyof typeof ModeOptions;

export const NodeControls = ({ id }: Props) => {
const [mode, setMode] = useState<Mode>('SETTINGS');
const { updateModelItem, updateViewItem, deleteViewItem } = useScene();
const { updateModelItem, updateViewItem, deleteViewItem, duplicateViewItem } = useScene();
const uiStateActions = useUiStateStore((state) => {
return state.actions;
});
Expand Down Expand Up @@ -101,6 +101,9 @@ export const NodeControls = ({ id }: Props) => {
uiStateActions.setItemControls(null);
deleteViewItem(viewItem.id);
}}
onDuplicated={() => {
duplicateViewItem(viewItem);
}}
/>
)}
{mode === 'CHANGE_ICON' && (
Expand Down

0 comments on commit 9005631

Please sign in to comment.