utils.tsx 404 B

1234567891011
  1. import localStorage from 'sentry/utils/localStorage';
  2. const SHOW_TEMPLATES_KEY = 'dashboards-show-templates';
  3. export function shouldShowTemplates(): boolean {
  4. const shouldShow = localStorage.getItem(SHOW_TEMPLATES_KEY);
  5. return shouldShow === 'true' || shouldShow === null;
  6. }
  7. export function setShowTemplates(value: boolean) {
  8. localStorage.setItem(SHOW_TEMPLATES_KEY, value ? 'true' : 'false');
  9. }