import { AnyAction } from 'redux' ; import { ThunkDispatch } from 'redux-thunk' ; import { connect } from 'react-redux' ; import { TimesliderToggleButton } from './timeslider_toggle_button' ; import { closeTimeslider , openTimeslider } from '../../../actions' ; import { getIsTimesliderOpen } from '../../../selectors/ui_selectors' ; import { MapStoreState } from '../../../reducers/store' ; function mapStateToProps ( state ) { return { isTimesliderOpen : getIsTimesliderOpen ( state ) , } ; } function mapDispatchToProps ( dispatch ) { return { closeTimeslider : ( ) => { dispatch ( closeTimeslider ( ) ) ; } , openTimeslider : ( ) => { dispatch ( openTimeslider ( ) ) ; } , } ; } const connected = connect ( mapStateToProps , mapDispatchToProps ) ( TimesliderToggleButton ) ; export { connected as TimesliderToggleButton } ;