error boundary

This commit is contained in:
Jan Prochazka
2020-12-08 17:24:47 +01:00
parent b47c9f81d2
commit cc11e63cd7
4 changed files with 55 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import Modal from 'react-modal';
import styled from 'styled-components';
import useTheme from '../theme/useTheme';
import ErrorBoundary from '../utility/ErrorBoundary';
// const StyledModal = styled(Modal)`
// position: absolute;
@@ -80,7 +81,7 @@ export default function ModalBase({ modalState, children, isFlex = false, fullSc
// zIndex: 1200,
// }}
>
{children}
<ErrorBoundary>{children}</ErrorBoundary>
</StyledModal>
);
}