import { Dispatch } from 'redux' ; import * as asyncactions from 'store/results/async-actions' ; import { RootState } from 'store' ; import { Results , ResultsActions } from 'store/results/types' ; export const mapStateToProps = ( { results } ) => { const { results : resultsData , resultsHistory , loading } = results ; return { resultsData , resultsHistory , loading } ; } ; export const mapDispatcherToProps = ( dispatch ) => ( { getAndSetResultsById : async ( resultsId ) : Promise < Results | undefined > => ( asyncactions . getAndSetResultsById ( dispatch , resultsId ) ) , } ) ;