This repository has been archived on 2025-09-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
repertory-ui/src/redux/reducers/install_reducer.js

44 lines
979 B
JavaScript

import {createReducer} from 'redux-starter-kit';
import {
setDismissDependencies,
setInstallActive,
setInstallComplete,
setMissingDependencies
} from '../actions/install_actions';
export const installReducer = createReducer({
DismissDependencies: false,
InstallActive: false,
InstallResult: null,
InstallType: null,
MissingDependencies: [],
}, {
[setDismissDependencies]: (state, action) => {
return {
...state,
DismissDependencies: action.payload,
}
},
[setInstallActive]: (state, action) => {
return {
...state,
InstallActive: true,
InstallResult: null,
InstallType: action.payload,
};
},
[setInstallComplete]: (state, action) => {
return {
...state,
InstallActive: false,
InstallResult: action.payload,
InstallType: null,
}
},
[setMissingDependencies]: (state, action) => {
return {
...state,
MissingDependencies: action.payload,
}
}
});