chore: fix conflicts
This commit is contained in:
@@ -2,9 +2,8 @@ import { useEffect } from 'react';
|
||||
|
||||
import { useStoreApi } from '../hooks/useStore';
|
||||
import useKeyPress from './useKeyPress';
|
||||
import { KeyCode } from '../types';
|
||||
import type { KeyCode } from '../types';
|
||||
import useReactFlow from './useReactFlow';
|
||||
|
||||
interface HookParams {
|
||||
deleteKeyCode: KeyCode | null;
|
||||
multiSelectionKeyCode: KeyCode | null;
|
||||
@@ -19,13 +18,10 @@ export default ({ deleteKeyCode, multiSelectionKeyCode }: HookParams): void => {
|
||||
|
||||
useEffect(() => {
|
||||
if (deleteKeyPressed) {
|
||||
const {
|
||||
nodeInternals,
|
||||
edges,
|
||||
} = store.getState();
|
||||
const { nodeInternals, edges } = store.getState();
|
||||
const nodes = Array.from(nodeInternals.values());
|
||||
const nodeIds = nodes.filter(node => node.selected).map(node => node.id);
|
||||
const edgeIds = edges.filter(edge => edge.selected).map(edge => edge.id);
|
||||
const nodeIds = nodes.filter((node) => node.selected).map((node) => node.id);
|
||||
const edgeIds = edges.filter((edge) => edge.selected).map((edge) => edge.id);
|
||||
deleteElements(nodeIds, edgeIds);
|
||||
store.setState({ nodesSelectionActive: false });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user