Dashboards: Fix home dashboard loading (#95376)

Dashboards: Fix home dashboard load
This commit is contained in:
Alex Khomenko 2024-10-28 09:19:59 +02:00 committed by GitHub
parent 0880329796
commit 16b9cf07f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,10 +43,6 @@ function DashboardPageProxy(props: DashboardPageProxyProps) {
return stateManager.fetchDashboard({ route: props.route.routeName as DashboardRoutes, uid: params.uid ?? '' });
}, [params.uid, props.route.routeName]);
if (!config.featureToggles.dashboardSceneForViewers) {
return <DashboardPage {...props} params={params} location={location} />;
}
if (dashboard.loading) {
return null;
}
@ -55,6 +51,10 @@ function DashboardPageProxy(props: DashboardPageProxyProps) {
return null;
}
if (!config.featureToggles.dashboardSceneForViewers) {
return <DashboardPage {...props} params={params} location={location} />;
}
if (
dashboard.value &&
!(dashboard.value.meta?.canEdit || dashboard.value.meta?.canMakeEditable) &&