refactor(zoom): move zoom methods into own hook, detatch from store

This commit is contained in:
Christopher Möller
2020-11-09 17:23:59 +01:00
parent 803a4aea57
commit cf38388f14
8 changed files with 139 additions and 152 deletions
+4 -3
View File
@@ -1,10 +1,11 @@
import React, { FC } from 'react';
import { StoreProvider, useStore } from 'easy-peasy';
import { StoreProvider } from 'easy-peasy';
import store, { StoreModel } from '../../store';
import store from '../../store';
import { useStore } from '../../store/hooks';
const Wrapper: FC = ({ children }) => {
const easyPeasyStore = useStore<StoreModel>();
const easyPeasyStore = useStore();
const isWrapepdWithReactFlowProvider = easyPeasyStore?.getState()?.reactFlowVersion;
if (isWrapepdWithReactFlowProvider) {