2022-02-16 22:10:09 +00:00
|
|
|
import { TActionEnterpriseModules } from '../actions/enterpriseModules';
|
|
|
|
import { ENTERPRISE_MODULES } from '../actions/actionsTypes';
|
|
|
|
|
2022-02-22 12:07:54 +00:00
|
|
|
export type IEnterpriseModules = string;
|
2022-02-16 22:10:09 +00:00
|
|
|
|
|
|
|
export const initialState: IEnterpriseModules[] = [];
|
|
|
|
|
|
|
|
export default (state = initialState, action: TActionEnterpriseModules): IEnterpriseModules[] => {
|
|
|
|
switch (action.type) {
|
|
|
|
case ENTERPRISE_MODULES.SET:
|
|
|
|
return action.payload;
|
|
|
|
case ENTERPRISE_MODULES.CLEAR:
|
|
|
|
return initialState;
|
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|