Use activeContexts getter/selector in commandsManager
This commit is contained in:
parent
8b636b53be
commit
4d540170aa
@ -26,6 +26,7 @@ import { Provider } from 'react-redux';
|
|||||||
import { BrowserRouter as Router } from 'react-router-dom';
|
import { BrowserRouter as Router } from 'react-router-dom';
|
||||||
import WhiteLabellingContext from './WhiteLabellingContext';
|
import WhiteLabellingContext from './WhiteLabellingContext';
|
||||||
import appCommands from './appCommands';
|
import appCommands from './appCommands';
|
||||||
|
import { getActiveContexts } from './store/layout/selectors.js';
|
||||||
import i18n from '@ohif/i18n';
|
import i18n from '@ohif/i18n';
|
||||||
import setupTools from './setupTools';
|
import setupTools from './setupTools';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
@ -33,7 +34,7 @@ import store from './store';
|
|||||||
// ~~~~ APP SETUP
|
// ~~~~ APP SETUP
|
||||||
const commandsManagerConfig = {
|
const commandsManagerConfig = {
|
||||||
getAppState: () => store.getState(),
|
getAppState: () => store.getState(),
|
||||||
getActiveContexts: () => store.getState().ui.activeContexts,
|
getActiveContexts: () => getActiveContexts(store.getState()),
|
||||||
};
|
};
|
||||||
|
|
||||||
const commandsManager = new CommandsManager(commandsManagerConfig);
|
const commandsManager = new CommandsManager(commandsManagerConfig);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user