From 8eff87534019b20785e01fbcbec61b393bd5c148 Mon Sep 17 00:00:00 2001 From: Ayo Date: Thu, 27 Jul 2023 18:40:27 +0200 Subject: [PATCH] refactor: feature flags --- src/components/SettingsPopover.astro | 7 ++++--- src/utils/feature-flags.ts | 14 +++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/SettingsPopover.astro b/src/components/SettingsPopover.astro index c5e5334..1aebd96 100644 --- a/src/components/SettingsPopover.astro +++ b/src/components/SettingsPopover.astro @@ -1,6 +1,6 @@ --- import Icon from "astro-iconify"; -import { featureFlags, featureLabels } from "../utils/feature-flags"; +import { featureFlags } from "../utils/feature-flags"; export interface Props { toggle: string; } @@ -29,12 +29,12 @@ const { toggle } = Astro.props; id={`settings-${index}`} name={`settings-${index}`} /> - + ) ) } - This is where feature flags will be set once made available. + This is where feature flags will be set once made available. Request features or report bugs here. diff --git a/src/utils/feature-flags.ts b/src/utils/feature-flags.ts index 414b21c..8d51f4e 100644 --- a/src/utils/feature-flags.ts +++ b/src/utils/feature-flags.ts @@ -1,14 +1,6 @@ -export enum Features { - "SendToEmail", - "HideImages", -} - -export const featureLabels: Record = { - [Features.SendToEmail]: "Send to email", - [Features.HideImages]: "Hide images", -}; +export type Features = 'Send to Email' | 'Hide Images'; export const featureFlags: Record = { - [Features.SendToEmail]: false, - [Features.HideImages]: false, + 'Send to Email': false, + 'Hide Images': true, };