Unmount all on 'Activate'
This commit is contained in:
@@ -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();
|
||||
setActiveRelease(release.Release, release.Version);
|
||||
unmountAll(() => {
|
||||
setActiveRelease(release.Release, release.Version);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user