diff --git a/ui/src/data_explorer/reducers/ui.ts b/ui/src/data_explorer/reducers/ui.ts index 1a791dd92..f9bb24bba 100644 --- a/ui/src/data_explorer/reducers/ui.ts +++ b/ui/src/data_explorer/reducers/ui.ts @@ -2,13 +2,29 @@ interface DataExplorerState { queryIDs: ReadonlyArray } +interface ActionAddQuery { + type: 'DE_ADD_QUERY' + payload: { + queryID: string + } +} + +interface ActionDeleteQuery { + type: 'DE_DELETE_QUERY' + payload: { + queryID: string + } +} + +type Action = ActionAddQuery | ActionDeleteQuery + const initialState = { queryIDs: [], } const ui = ( state: DataExplorerState = initialState, - action + action: Action ): DataExplorerState => { switch (action.type) { // there is an additional reducer for this same action in the queryConfig reducer