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

@@ -16,6 +16,7 @@ import DragAndDropFileTarget from './DragAndDropFileTarget';
import { useUploadsZone } from './utility/UploadsProvider';
import useTheme from './theme/useTheme';
import { MenuLayer } from './modals/showMenu';
import ErrorBoundary from './utility/ErrorBoundary';
const BodyDiv = styled.div`
position: fixed;
@@ -113,7 +114,9 @@ export default function Screen() {
</IconBar>
{!!currentWidget && (
<LeftPanel theme={theme}>
<WidgetContainer />
<ErrorBoundary>
<WidgetContainer />
</ErrorBoundary>
</LeftPanel>
)}
{!!currentWidget && (