mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Previews: refactor (#47728)
* #44449: return standard thumb service even if auth setup fails * #44449: remove dashboardPreviewsScheduler feature flag * #44449: externalize dashboardPreviews config * #44449: disable previews by default * #44449: rename logger * #44449: dashboardPreviewsAdmin feature requires dev mode * #44449: retrigger CII
This commit is contained in:
@@ -6,7 +6,7 @@ import { PREVIEWS_LOCAL_STORAGE_KEY } from '../constants';
|
||||
|
||||
export const useShowDashboardPreviews = () => {
|
||||
const previewFeatureEnabled = Boolean(config.featureToggles.dashboardPreviews);
|
||||
const [showPreviews, setShowPreviews] = useLocalStorage<boolean>(PREVIEWS_LOCAL_STORAGE_KEY, previewFeatureEnabled);
|
||||
const [showPreviews, setShowPreviews] = useLocalStorage<boolean>(PREVIEWS_LOCAL_STORAGE_KEY, false);
|
||||
|
||||
return { showPreviews: Boolean(showPreviews && previewFeatureEnabled), previewFeatureEnabled, setShowPreviews };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user