2020-02-13 16:06:45 +01:00
|
|
|
import { DashboardState, PanelState } from 'app/types';
|
|
|
|
|
|
|
|
|
|
export function getPanelStateById(state: DashboardState, panelId: number): PanelState {
|
|
|
|
|
if (!panelId) {
|
|
|
|
|
return {} as PanelState;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return state.panels[panelId] ?? ({} as PanelState);
|
|
|
|
|
}
|