chore: release version v1.12.6

This commit is contained in:
Dmitry Popov
2024-10-24 21:18:03 +02:00
parent b6bb4647c7
commit d96dfa63c9

View File

@@ -1,17 +1,10 @@
import { Node, useReactFlow } from 'reactflow'; import { Node, useReactFlow } from 'reactflow';
import { useCallback, useRef } from 'react'; import { useCallback } from 'react';
import { CommandAddSystems } from '@/hooks/Mapper/types/mapHandlers.ts'; import { CommandAddSystems } from '@/hooks/Mapper/types/mapHandlers.ts';
import { convertSystem2Node } from '../../helpers'; import { convertSystem2Node } from '../../helpers';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
export const useMapAddSystems = () => { export const useMapAddSystems = () => {
const rf = useReactFlow(); const rf = useReactFlow();
const {
data: { systems },
} = useMapRootState();
const ref = useRef({ rf, systems });
ref.current = { systems, rf };
return useCallback( return useCallback(
(systems: CommandAddSystems) => { (systems: CommandAddSystems) => {