refactor: use progress component on extention error boundary

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2023-11-30 16:19:30 +01:00
parent e5b00a94e6
commit de595c955c
@@ -64,6 +64,7 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
const componentsApi = useApi(componentsApiRef);
const plugin = node.spec.source;
const Progress = componentsApi.getComponent(coreComponentsRefs.progress);
const fallback = componentsApi.getComponent(
coreComponentsRefs.errorBoundaryFallback,
);
@@ -75,7 +76,7 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
};
return (
<Suspense fallback="Loading...">
<Suspense fallback={<Progress />}>
<ErrorBoundary plugin={plugin} fallback={fallback}>
<AnalyticsContext attributes={attributes}>
<RouteTracker disableTracking={!routable}>{children}</RouteTracker>