mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 02:35:42 +00:00
chore: release version v1.12.6
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user