2018-02-23 17:24:00 -07:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-29 13:23:53 -04:00
|
|
|
import { doAutoUpdateDeclined, doHideModal } from 'redux/actions/app';
|
2022-07-07 16:48:42 -04:00
|
|
|
import { selectAutoUpdateFailed, selectAutoUpdateDownloading, selectIsUpgradeAvailable } from 'redux/selectors/app';
|
2018-02-23 17:24:00 -07:00
|
|
|
import ModalAutoUpdateDownloaded from './view';
|
2017-12-08 05:08:50 -05:00
|
|
|
|
2022-07-07 16:48:42 -04:00
|
|
|
const select = (state, props) => ({
|
|
|
|
errorWhileUpdating: selectAutoUpdateFailed(state),
|
|
|
|
isDownloading: selectAutoUpdateDownloading(state),
|
|
|
|
isUpdateAvailable: selectIsUpgradeAvailable(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
2018-10-29 13:23:53 -04:00
|
|
|
closeModal: () => dispatch(doHideModal()),
|
2018-01-17 05:50:02 -05:00
|
|
|
declineAutoUpdate: () => dispatch(doAutoUpdateDeclined()),
|
2017-12-22 01:42:04 -05:00
|
|
|
});
|
|
|
|
|
2022-07-07 16:48:42 -04:00
|
|
|
export default connect(select, perform)(ModalAutoUpdateDownloaded);
|