import { useAppState } from '../../Application' ; import Selectors from '../../selectors' ; import { handleCancelEdit , handleUploadFile , handleChangeBackground } from "../../actions" ; import { asyncUpdateBlock } from "../../async-actions" ; import BlockChangeBackground , { BLOCK_UPLOAD_KEY } from './block-change-background' ; export default ( properties ) : React . ReactElement => { const { state , dispatch } = useAppState ( ) ; const changeBackgroundProperties = { progress : Selectors ( state , properties ) . getUploadProgress ( BLOCK_UPLOAD_KEY ) , mobilization : Selectors ( state , properties ) . getMobilization ( ) , update : asyncUpdateBlock ( dispatch ) , onChangeBackground : handleChangeBackground ( dispatch ) , onCancelEdit : handleCancelEdit ( dispatch ) , onUploadFile : handleUploadFile ( dispatch ) } ; return < BlockChangeBackground { ... properties } { ... changeBackgroundProperties } />; } ;