Files
2024-02-15 17:01:50 +00:00

12 lines
404 B
TypeScript

import localStorage from 'sentry/utils/localStorage';
const SHOW_TEMPLATES_KEY = 'dashboards-show-templates';
export function shouldShowTemplates(): boolean {
const shouldShow = localStorage.getItem(SHOW_TEMPLATES_KEY);
return shouldShow === 'true' || shouldShow === null;
}
export function setShowTemplates(value: boolean) {
localStorage.setItem(SHOW_TEMPLATES_KEY, value ? 'true' : 'false');
}