Skip to content

Commit

Permalink
simplify some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytroshch committed Jul 12, 2024
1 parent 8f67cd5 commit a5c9a2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const mapStateToProps = (state = {}) => ({
})

const mapDispatchToProps = dispatch => ({
onClose: (visible) => dispatch(UIActions.changeUIModalState(UI_MODAL_KEYS.BAD_INTERNET_CONNECTION_MODAL, visible)),
onClose: () => dispatch(UIActions.changeUIModalState(UI_MODAL_KEYS.BAD_INTERNET_CONNECTION_MODAL, false)),
})

export default connect(mapStateToProps, mapDispatchToProps)(BadConnectionModal)
8 changes: 2 additions & 6 deletions src/modals/NoConnectionActionModal/NoConnectionActionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ import Modal from '../../ui/Modal'
import './style.css'

const NoConnectionActionModal = ({
changeIsNoConnectionModalState, visible,
onClose, visible,
}) => {
const { t } = useTranslation()

const onClose = () => {
changeIsNoConnectionModalState(false)
}

return (
<Modal
label={t('noConnectionActionModal.title')}
Expand All @@ -34,7 +30,7 @@ const NoConnectionActionModal = ({
}

NoConnectionActionModal.propTypes = {
changeIsNoConnectionModalState: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
visible: PropTypes.bool.isRequired,
}

Expand Down

0 comments on commit a5c9a2a

Please sign in to comment.