Skip to content

Commit

Permalink
Merge pull request #1459 from redpanda-data/add-error-boundary
Browse files Browse the repository at this point in the history
frontend: add ErrorBoundary around AppContent in EmbeddedApp
  • Loading branch information
rikimaru0345 authored Sep 24, 2024
2 parents bd988c1 + ab76e02 commit cb485b5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/EmbeddedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* by the Apache License, Version 2.0
*/

import { useEffect } from 'react';
import { useEffect } from 'react';
import { BrowserRouter } from 'react-router-dom';

/* start global stylesheets */
Expand All @@ -30,6 +30,7 @@ import HistorySetter from './components/misc/HistorySetter';
import AppContent from './components/layout/Content';
import { observer } from 'mobx-react';
import { ChakraProvider, redpandaTheme, redpandaToastOptions } from '@redpanda-data/ui';
import { ErrorBoundary } from './components/misc/ErrorBoundary';

export interface EmbeddedProps extends SetConfigArguments {
/**
Expand Down Expand Up @@ -77,7 +78,9 @@ function EmbeddedApp({ basePath, ...p }: EmbeddedProps) {
<BrowserRouter basename={basePath}>
<HistorySetter />
<ChakraProvider theme={redpandaTheme} toastOptions={redpandaToastOptions}>
<AppContent />
<ErrorBoundary>
<AppContent />
</ErrorBoundary>
</ChakraProvider>
</BrowserRouter>
);
Expand Down

0 comments on commit cb485b5

Please sign in to comment.