From e86d9bc04c72e88cc27173611db4f99611d1e136 Mon Sep 17 00:00:00 2001 From: Ayo Date: Tue, 25 Jul 2023 23:18:49 +0200 Subject: [PATCH] feat: implement feature flags --- src/components/SettingsPopover.astro | 22 +++++++++++++++++----- src/utils/feature-flags.ts | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/utils/feature-flags.ts diff --git a/src/components/SettingsPopover.astro b/src/components/SettingsPopover.astro index 0558a50..729e3ad 100644 --- a/src/components/SettingsPopover.astro +++ b/src/components/SettingsPopover.astro @@ -1,23 +1,35 @@ --- import Icon from "astro-iconify"; +import { featureFlags, featureLabels } from "../utils/feature-flags"; export interface Props { toggle: string; } +const enabledSettings = Object.keys(featureFlags).filter( + (key) => featureFlags[key] +); + const { toggle } = Astro.props; --- -