26 lines
587 B
React
26 lines
587 B
React
|
import React from 'react'
|
||
|
import {
|
||
|
connect
|
||
|
} from 'react-redux'
|
||
|
import {
|
||
|
doStartUpgrade,
|
||
|
doCancelUpgrade,
|
||
|
} from 'actions/app'
|
||
|
import {
|
||
|
selectDownloadProgress,
|
||
|
selectDownloadComplete,
|
||
|
} from 'selectors/app'
|
||
|
import DownloadingModal from './view'
|
||
|
|
||
|
const select = (state) => ({
|
||
|
downloadProgress: selectDownloadProgress(state),
|
||
|
downloadComplete: selectDownloadComplete(state),
|
||
|
})
|
||
|
|
||
|
const perform = (dispatch) => ({
|
||
|
startUpgrade: () => dispatch(doStartUpgrade()),
|
||
|
cancelUpgrade: () => dispatch(doCancelUpgrade())
|
||
|
})
|
||
|
|
||
|
export default connect(select, perform)(DownloadingModal)
|