import { useAppState } from '../../Application' ; import Selectors from '../../selectors' ; import { asyncUpdateWidget } from '../../async-actions' ; import Widget from './widget' ; export default ( properties ) : React . ReactElement => { const { state , dispatch } = useAppState ( ) ; const selectors = Selectors ( state , properties ) ; const widgetProperties = { saving : selectors . widgetsIsLoading ( ) , mobilization : selectors . getMobilization ( ) || selectors . getMobilizations ( ) [ 0 ] , update : asyncUpdateWidget ( dispatch ) } ; return < Widget { ... widgetProperties } { ... properties } />; } ;