import { connect } from 'react-redux' ; import BackButton from 'components/BackButton' ; import { actions } from 'modules/page' ; import { navigateWithReset } from 'modules/navigator/actions' ; import { navTypes } from '../constants' ; const mapStateToProps = ( state ) => ( { historyItems : state . application . history , } ) ; const mapDispatchToProps = ( dispatch ) => ( { requestPageStarted : ( pagePayload ) => { dispatch ( actions . requestPage . started ( pagePayload ) ) ; } , navigateWithReset : ( ) => dispatch ( navigateWithReset ( [ { routeName : navTypes . HOME } ] ) ) , } ) ; export default connect ( mapStateToProps , mapDispatchToProps ) ( BackButton ) ;