10 lines
253 B
TypeScript
10 lines
253 B
TypeScript
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);
|
|
}
|