![dependabot[bot]](/assets/img/avatar_default.png)
* Bump eslint-config-airbnb-typescript in /kafka-ui-react-app Bumps [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript) from 12.3.1 to 14.0.2. - [Release notes](https://github.com/iamturns/eslint-config-airbnb-typescript/releases) - [Changelog](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/iamturns/eslint-config-airbnb-typescript/compare/v12.3.1...v14.0.2) --- updated-dependencies: - dependency-name: eslint-config-airbnb-typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update Eslint config * Update eslint Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oleg Shuralev <workshur@gmail.com>
35 lines
894 B
TypeScript
35 lines
894 B
TypeScript
import { Action } from 'redux/interfaces';
|
|
import { getType } from 'typesafe-actions';
|
|
import * as actions from 'redux/actions';
|
|
import { KsqlState } from 'redux/interfaces/ksqlDb';
|
|
|
|
export const initialState: KsqlState = {
|
|
streams: [],
|
|
tables: [],
|
|
executionResult: null,
|
|
};
|
|
|
|
// eslint-disable-next-line @typescript-eslint/default-param-last
|
|
const reducer = (state = initialState, action: Action): KsqlState => {
|
|
switch (action.type) {
|
|
case getType(actions.fetchKsqlDbTablesAction.success):
|
|
return {
|
|
...state,
|
|
...action.payload,
|
|
};
|
|
case getType(actions.executeKsqlAction.success):
|
|
return {
|
|
...state,
|
|
executionResult: action.payload,
|
|
};
|
|
case getType(actions.resetExecutionResult):
|
|
return {
|
|
...state,
|
|
executionResult: null,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default reducer;
|