mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 02:35:42 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
832d874a0e | ||
|
|
6a133d4dbd | ||
|
|
d96dfa63c9 |
@@ -2,6 +2,11 @@
|
||||
|
||||
<!-- changelog -->
|
||||
|
||||
## [v1.12.8](https://github.com/wanderer-industries/wanderer/compare/v1.12.7...v1.12.8) (2024-10-24)
|
||||
|
||||
|
||||
|
||||
|
||||
## [v1.12.7](https://github.com/wanderer-industries/wanderer/compare/v1.12.6...v1.12.7) (2024-10-24)
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
import { Node, useReactFlow } from 'reactflow';
|
||||
import { useCallback, useRef } from 'react';
|
||||
import { useCallback } from 'react';
|
||||
import { CommandAddSystems } from '@/hooks/Mapper/types/mapHandlers.ts';
|
||||
import { convertSystem2Node } from '../../helpers';
|
||||
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
|
||||
|
||||
export const useMapAddSystems = () => {
|
||||
const rf = useReactFlow();
|
||||
const {
|
||||
data: { systems },
|
||||
} = useMapRootState();
|
||||
|
||||
const ref = useRef({ rf, systems });
|
||||
ref.current = { systems, rf };
|
||||
|
||||
return useCallback(
|
||||
(systems: CommandAddSystems) => {
|
||||
|
||||
Reference in New Issue
Block a user