4
4
// SPDX-License-Identifier: Apache-2.0
5
5
import '@fontsource-variable/karla' ;
6
6
import { StyledEngineProvider , ThemeProvider } from '@mui/material/styles' ;
7
+ import { ErrorBoundary } from 'react-error-boundary' ;
7
8
8
9
import { View } from '../../enums/enums' ;
9
10
import { useAppSelector } from '../../state/hooks' ;
@@ -12,7 +13,7 @@ import { getSelectedView } from '../../state/selectors/view-selector';
12
13
import { usePanelSizes } from '../../state/variables/use-panel-sizes' ;
13
14
import { useSignalsWorker } from '../../web-workers/use-signals-worker' ;
14
15
import { AuditView } from '../AuditView/AuditView' ;
15
- import { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary ' ;
16
+ import { ErrorFallback } from '../ErrorFallback/ErrorFallback ' ;
16
17
import { GlobalPopup } from '../GlobalPopup/GlobalPopup' ;
17
18
import { ProcessPopup } from '../ProcessPopup/ProcessPopup' ;
18
19
import { ReportView } from '../ReportView/ReportView' ;
@@ -32,18 +33,18 @@ export function App() {
32
33
usePanelSizes ( ) ; // pre-hydrate size of panels
33
34
34
35
return (
35
- < ErrorBoundary >
36
- < StyledEngineProvider injectFirst >
37
- < ThemeProvider theme = { theme } >
38
- < GlobalPopup / >
39
- < ProcessPopup />
40
- < ViewContainer >
36
+ < StyledEngineProvider injectFirst >
37
+ < ThemeProvider theme = { theme } >
38
+ < ViewContainer >
39
+ < ErrorBoundary FallbackComponent = { ErrorFallback } >
40
+ < GlobalPopup />
41
+ < ProcessPopup / >
41
42
< TopBar />
42
43
{ renderView ( ) }
43
- </ ViewContainer >
44
- </ ThemeProvider >
45
- </ StyledEngineProvider >
46
- </ ErrorBoundary >
44
+ </ ErrorBoundary >
45
+ </ ViewContainer >
46
+ </ ThemeProvider >
47
+ </ StyledEngineProvider >
47
48
) ;
48
49
49
50
function renderView ( ) {
0 commit comments