Changes from [PR-186] applied

This commit is contained in:
Guzel Kafizova 2021-02-11 17:04:46 +03:00
parent 427baa490c
commit 6a108b16a4
3 changed files with 6 additions and 12 deletions

View file

@ -99,7 +99,7 @@ export const fetchConsumerGroupDetailsAction = createAsyncAction(
>();
export const fetchSchemasByClusterNameAction = createAsyncAction(
ActionType.GET_CLUSTER_SCHEMAS__REQUEST,
ActionType.GET_CLUSTER_SCHEMAS__SUCCESS,
ActionType.GET_CLUSTER_SCHEMAS__FAILURE
'GET_CLUSTER_SCHEMAS__REQUEST',
'GET_CLUSTER_SCHEMAS__SUCCESS',
'GET_CLUSTER_SCHEMAS__FAILURE'
)<undefined, SchemaSubject[], undefined>();

View file

@ -1,5 +1,4 @@
import { SchemaSubject } from 'generated-sources';
import ActionType from 'redux/actionType';
import { Action, SchemasState } from 'redux/interfaces';
export const initialState: SchemasState = {
@ -34,7 +33,7 @@ const updateSchemaList = (
const reducer = (state = initialState, action: Action): SchemasState => {
switch (action.type) {
case ActionType.GET_CLUSTER_SCHEMAS__SUCCESS:
case 'GET_CLUSTER_SCHEMAS__SUCCESS':
return updateSchemaList(state, action.payload);
default:
return state;

View file

@ -1,10 +1,5 @@
import { createSelector } from 'reselect';
import {
FetchStatus,
RootState,
SchemasState,
TopicName,
} from 'redux/interfaces';
import { RootState, SchemasState } from 'redux/interfaces';
import { createFetchingSelector } from 'redux/reducers/loader/selectors';
const schemasState = ({ schemas }: RootState): SchemasState => schemas;
@ -18,7 +13,7 @@ const getSchemaListFetchingStatus = createFetchingSelector(
export const getIsSchemaListFetched = createSelector(
getSchemaListFetchingStatus,
(status) => status === FetchStatus.fetched
(status) => status === 'fetched'
);
export const getSchemaList = createSelector(