mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 22:28:25 +00:00
feat: added error boundary
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
WorkspaceProvider
|
||||
} from "@app/context";
|
||||
import { AppLayout } from "@app/layouts";
|
||||
import ErrorBoundaryWrapper from "@app/layouts/AppLayout/ErrorBoundary";
|
||||
import { queryClient } from "@app/reactQuery";
|
||||
|
||||
import "nprogress/nprogress.css";
|
||||
@@ -85,6 +86,7 @@ const App = ({ Component, pageProps, ...appProps }: NextAppProp): JSX.Element =>
|
||||
!Component.requireAuth
|
||||
) {
|
||||
return (
|
||||
<ErrorBoundaryWrapper>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<NotificationContainer />
|
||||
<ServerConfigProvider>
|
||||
@@ -95,12 +97,14 @@ const App = ({ Component, pageProps, ...appProps }: NextAppProp): JSX.Element =>
|
||||
</UserProvider>
|
||||
</ServerConfigProvider>
|
||||
</QueryClientProvider>
|
||||
</ErrorBoundaryWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
const Layout = Component?.layout || AppLayout;
|
||||
|
||||
return (
|
||||
<ErrorBoundaryWrapper>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<TooltipProvider>
|
||||
<NotificationContainer />
|
||||
@@ -125,6 +129,7 @@ const App = ({ Component, pageProps, ...appProps }: NextAppProp): JSX.Element =>
|
||||
</ServerConfigProvider>
|
||||
</TooltipProvider>
|
||||
</QueryClientProvider>
|
||||
</ErrorBoundaryWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user