Unmount all on 'Activate'

This commit is contained in:
2021-03-10 15:57:04 -06:00
parent e79f4e72d4
commit e84bff7b20

View File

@@ -8,6 +8,7 @@ import {
notifyInfo
} from '../../../redux/actions/error_actions';
import {setActiveRelease} from '../../../redux/actions/release_version_actions';
import {unmountAll} from '../../../redux/actions/mount_actions';
const mapStateToProps = state => {
return {
@@ -21,6 +22,7 @@ const mapDispatchToProps = dispatch => {
setActiveRelease: (release, version) => dispatch(setActiveRelease(release, version)),
notifyError: msg => dispatch(notifyError(msg)),
notifyInfo: (title, msg) => dispatch(notifyInfo(title, msg)),
unmountAll: completedCallback => dispatch(unmountAll(completedCallback)),
};
};
@@ -32,7 +34,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(({
lastItem,
notifyError,
notifyInfo,
setActiveRelease
setActiveRelease,
unmountAll,
}) => {
const title = '[' + Constants.RELEASE_TYPES[release.Release] + '] ' + release.Display;
const displayChanges = async () => {
@@ -47,7 +50,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(({
const isActiveRelease = ((release.Release === ActiveRelease) && (release.Version === ActiveVersion));
const setReleaseAndVersion = () => {
dismiss();
unmountAll(() => {
setActiveRelease(release.Release, release.Version);
});
};
return (