44 lines
979 B
JavaScript
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,
|
|
}
|
|
}
|
|
}); |