Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix: add Syncing error boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
korhaliv committed Aug 15, 2019
1 parent f9d25c6 commit 5cfc725
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions renderer/containers/Syncing.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { showNotification } from 'reducers/notification'
import Syncing from 'components/Syncing'
import { Modal, ModalOverlayStyles } from 'components/UI'
import { useOnKeydown } from 'hooks'
import AppErrorBoundary from 'components/ErrorBoundary/AppErrorBoundary'

const mapStateToProps = state => ({
address: addressSelectors.currentAddress(state),
Expand Down Expand Up @@ -43,11 +44,13 @@ const ModalOverlay = styled.div`
const SyncingModal = ({ onClose, ...rest }) => {
useOnKeydown('Escape', onClose)
return (
<ModalOverlay>
<Modal hasClose onClose={onClose} {...rest} p={4}>
<SyncingContainer />
</Modal>
</ModalOverlay>
<AppErrorBoundary onCloseDialog={onClose}>
<ModalOverlay>
<Modal hasClose onClose={onClose} {...rest} p={4}>
<SyncingContainer />
</Modal>
</ModalOverlay>
</AppErrorBoundary>
)
}

Expand Down

0 comments on commit 5cfc725

Please # to comment.