Create wt-odlux directory
[ccsdk/features.git] / sdnr / wt-odlux / odlux / apps / inventoryApp / src / handlers / panelHandler.ts
1 import { IActionHandler } from '../../../../framework/src/flux/action';
2
3 import { SetPanelAction } from '../actions/panelActions';
4 import { PanelId } from '../models/panelId';
5
6 export const currentOpenPanelHandler: IActionHandler<PanelId> = (state = null, action) => {
7   if (action instanceof SetPanelAction) {
8     state = action.panelId;
9   }
10   return state;
11 };