mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: error boundary plausible (#3389)
This commit is contained in:
parent
dec16ce555
commit
a1535aed91
@ -48,61 +48,67 @@ export const App = () => {
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<SWRProvider>
|
||||
<Suspense fallback={<Loader />}>
|
||||
<PlausibleProvider>
|
||||
<ConditionallyRender
|
||||
condition={!hasFetchedAuth}
|
||||
show={<Loader />}
|
||||
elseShow={
|
||||
<>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(
|
||||
uiConfig?.maintenanceMode
|
||||
)}
|
||||
show={<MaintenanceBanner />}
|
||||
/>
|
||||
<StyledContainer>
|
||||
<ToastRenderer />
|
||||
<Routes>
|
||||
{availableRoutes.map(route => (
|
||||
<PlausibleProvider>
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<SWRProvider>
|
||||
<Suspense fallback={<Loader />}>
|
||||
<ConditionallyRender
|
||||
condition={!hasFetchedAuth}
|
||||
show={<Loader />}
|
||||
elseShow={
|
||||
<>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(
|
||||
uiConfig?.maintenanceMode
|
||||
)}
|
||||
show={<MaintenanceBanner />}
|
||||
/>
|
||||
<StyledContainer>
|
||||
<ToastRenderer />
|
||||
<Routes>
|
||||
{availableRoutes.map(route => (
|
||||
<Route
|
||||
key={route.path}
|
||||
path={route.path}
|
||||
element={
|
||||
<LayoutPicker
|
||||
isStandalone={
|
||||
route.isStandalone ===
|
||||
true
|
||||
}
|
||||
>
|
||||
<ProtectedRoute
|
||||
route={
|
||||
route
|
||||
}
|
||||
/>
|
||||
</LayoutPicker>
|
||||
}
|
||||
/>
|
||||
))}
|
||||
<Route
|
||||
key={route.path}
|
||||
path={route.path}
|
||||
path="/"
|
||||
element={
|
||||
<LayoutPicker
|
||||
isStandalone={
|
||||
route.isStandalone ===
|
||||
true
|
||||
}
|
||||
>
|
||||
<ProtectedRoute
|
||||
route={route}
|
||||
/>
|
||||
</LayoutPicker>
|
||||
<InitialRedirect />
|
||||
}
|
||||
/>
|
||||
))}
|
||||
<Route
|
||||
path="/"
|
||||
element={<InitialRedirect />}
|
||||
/>
|
||||
<Route
|
||||
path="*"
|
||||
element={<NotFound />}
|
||||
/>
|
||||
</Routes>
|
||||
<Route
|
||||
path="*"
|
||||
element={<NotFound />}
|
||||
/>
|
||||
</Routes>
|
||||
|
||||
<FeedbackNPS openUrl="http://feedback.unleash.run" />
|
||||
<FeedbackNPS openUrl="http://feedback.unleash.run" />
|
||||
|
||||
<SplashPageRedirect />
|
||||
</StyledContainer>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</PlausibleProvider>
|
||||
</Suspense>
|
||||
</SWRProvider>
|
||||
<SplashPageRedirect />
|
||||
</StyledContainer>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</Suspense>
|
||||
</SWRProvider>
|
||||
</ErrorBoundary>
|
||||
</PlausibleProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user