import React, { Dispatch } from 'react' import { connect } from 'react-redux' import { AnyAction } from 'redux' import appSlice from '../App.slice' import { InitError } from '../components/InitError/InitError' interface Props { onTryAgainPress: () => void } const InitErrorScreen: React.FunctionComponent = ({ onTryAgainPress }) => ( ) const mapDispatchToProps = (dispatch: Dispatch) => ({ onTryAgainPress: () => dispatch(appSlice.actions.initApp()), }) export default connect(null, mapDispatchToProps)(InitErrorScreen)