import { IRecommendedColumns , ISimpleAction } from 'types' ; const initialState = { columnsByAttribute : { } } ; export const recommendedColumns = ( state = initialState , action ) : any => { switch ( action . type ) { case 'FETCH_RECOMMENDED_COLUMNS_SUCCESS' : { return { ... state , columnsByAttribute : { ... state . columnsByAttribute , [ action . payload . fhirAttribute ] : [ ... action . payload . columns ] } } ; } default : return state ; } } ; export default recommendedColumns ;