import { connect , MapDispatchToProps , MapStateToProps } from 'react-redux' ; import { Dispatch } from 'redux' ; import SettingsModal , { ISettingsModalDispatchProps , ISettingsModalOwnProps , ISettingsModalStateProps , } from '../components/SettingsModal' ; import { asyncActionDispatcher , asyncDeleteFeedsAction , setLanguageAction , } from '../redux/actions' ; import { IReduxAction , IReduxState } from '../schemas' ; const mapStateToProps = ( state ) => ( { feeds : state . feeds . list , feedsMap : state . feeds . map , language : state . menu . language , } ) ; const mapDispatchToProps = ( dispatch ) => ( { asyncDeleteFeeds : ( feedIds ) => asyncActionDispatcher ( dispatch , asyncDeleteFeedsAction ( feedIds ) ) , setLanguage : ( language ) => dispatch ( setLanguageAction ( language ) ) , } ) ; export default connect ( mapStateToProps , mapDispatchToProps ) ( SettingsModal ) ;