aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/inventoryApp/src/handlers/panelHandler.ts
blob: 761253112591819dd7c41e35a8dfbc767f5c3888 (plain)
1
2
3
4
5
6
7
8
9
10
11
import { PanelId } from "../models/panelId";
import { IActionHandler } from "../../../../framework/src/flux/action";
import { SetPanelAction } from "../actions/panelActions";


export const currentOpenPanelHandler: IActionHandler<PanelId> = (state = null, action) => {
    if (action instanceof SetPanelAction) {
      state = action.panelId;
    }
    return state;
  }