ShareExternally: Fix refresh when time picker is hidden (#95206)

Fix refresh when time picker is hidden
This commit is contained in:
Juan Cabanas 2024-10-22 17:03:04 -03:00 committed by GitHub
parent 75a28bc367
commit 60915e7fe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,12 +59,9 @@ export function PublicDashboardScenePage({ route }: Props) {
return <PublicDashboardNotAvailable />;
}
// if no time picker render without url sync
if (dashboard.state.controls?.state.hideTimeControls) {
return <PublicDashboardSceneRenderer model={dashboard} />;
}
return (
// url sync is needed with or without time picker enabled to make refresh work
// the backend sanitizes the request payload
<UrlSyncContextProvider scene={dashboard}>
<PublicDashboardSceneRenderer model={dashboard} />
</UrlSyncContextProvider>