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 (
|
return (
|
||||||
<ErrorBoundary FallbackComponent={Error}>
|
<ErrorBoundary FallbackComponent={Error}>
|
||||||
<SWRProvider>
|
<PlausibleProvider>
|
||||||
<Suspense fallback={<Loader />}>
|
<ErrorBoundary FallbackComponent={Error}>
|
||||||
<PlausibleProvider>
|
<SWRProvider>
|
||||||
<ConditionallyRender
|
<Suspense fallback={<Loader />}>
|
||||||
condition={!hasFetchedAuth}
|
<ConditionallyRender
|
||||||
show={<Loader />}
|
condition={!hasFetchedAuth}
|
||||||
elseShow={
|
show={<Loader />}
|
||||||
<>
|
elseShow={
|
||||||
<ConditionallyRender
|
<>
|
||||||
condition={Boolean(
|
<ConditionallyRender
|
||||||
uiConfig?.maintenanceMode
|
condition={Boolean(
|
||||||
)}
|
uiConfig?.maintenanceMode
|
||||||
show={<MaintenanceBanner />}
|
)}
|
||||||
/>
|
show={<MaintenanceBanner />}
|
||||||
<StyledContainer>
|
/>
|
||||||
<ToastRenderer />
|
<StyledContainer>
|
||||||
<Routes>
|
<ToastRenderer />
|
||||||
{availableRoutes.map(route => (
|
<Routes>
|
||||||
|
{availableRoutes.map(route => (
|
||||||
|
<Route
|
||||||
|
key={route.path}
|
||||||
|
path={route.path}
|
||||||
|
element={
|
||||||
|
<LayoutPicker
|
||||||
|
isStandalone={
|
||||||
|
route.isStandalone ===
|
||||||
|
true
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<ProtectedRoute
|
||||||
|
route={
|
||||||
|
route
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</LayoutPicker>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
<Route
|
<Route
|
||||||
key={route.path}
|
path="/"
|
||||||
path={route.path}
|
|
||||||
element={
|
element={
|
||||||
<LayoutPicker
|
<InitialRedirect />
|
||||||
isStandalone={
|
|
||||||
route.isStandalone ===
|
|
||||||
true
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<ProtectedRoute
|
|
||||||
route={route}
|
|
||||||
/>
|
|
||||||
</LayoutPicker>
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
))}
|
<Route
|
||||||
<Route
|
path="*"
|
||||||
path="/"
|
element={<NotFound />}
|
||||||
element={<InitialRedirect />}
|
/>
|
||||||
/>
|
</Routes>
|
||||||
<Route
|
|
||||||
path="*"
|
|
||||||
element={<NotFound />}
|
|
||||||
/>
|
|
||||||
</Routes>
|
|
||||||
|
|
||||||
<FeedbackNPS openUrl="http://feedback.unleash.run" />
|
<FeedbackNPS openUrl="http://feedback.unleash.run" />
|
||||||
|
|
||||||
<SplashPageRedirect />
|
<SplashPageRedirect />
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</PlausibleProvider>
|
</Suspense>
|
||||||
</Suspense>
|
</SWRProvider>
|
||||||
</SWRProvider>
|
</ErrorBoundary>
|
||||||
|
</PlausibleProvider>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user