import { fetchStatistics } from '../http/fetcher' ; import { AppDispatch } from '../../contexts/reducer' ; import { PageActions } from '../../contexts/actions' ; export const getStatistics = ( dispatch ) => { fetchStatistics ( ) . then ( ( wrapper ) => { if ( wrapper ) { dispatch ( { type : PageActions . UpdateStatistics , payload : { statistics : wrapper . attributes , } , } ) ; } } ) ; } ; export default getStatistics ;