From 44f83c50fa55a7caf4c7e796c6ed15802ef0429c Mon Sep 17 00:00:00 2001 From: Adam Chmara Date: Tue, 3 Dec 2024 16:43:41 +0100 Subject: [PATCH] feat(dashboard): add ld flag for email, digest, delay (#7205) --- .../src/components/workflow-editor/add-step-menu.tsx | 7 +++++-- packages/shared/src/types/feature-flags.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx b/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx index 4c074a88d8c..bd0bac0e3e1 100644 --- a/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx +++ b/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx @@ -8,6 +8,8 @@ import { Badge } from '../primitives/badge'; import { cn } from '@/utils/ui'; import { StepTypeEnum } from '@/utils/enums'; import { STEP_TYPE_TO_COLOR } from '@/utils/color'; +import { useFeatureFlag } from '@/hooks/use-feature-flag'; +import { FeatureFlagsKeysEnum } from '@novu/shared'; const MenuGroup = ({ children }: { children: ReactNode }) => { return
{children}
; @@ -41,7 +43,7 @@ const MenuItem = ({ return ( void; }) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const isDelayDigestEmailEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_ND_DELAY_DIGEST_EMAIL_ENABLED); const handleMenuItemClick = (stepType: StepTypeEnum) => { onMenuItemClick(stepType); @@ -123,7 +126,7 @@ export const AddStepMenu = ({ Digest handleMenuItemClick(StepTypeEnum.DELAY)} > Delay diff --git a/packages/shared/src/types/feature-flags.ts b/packages/shared/src/types/feature-flags.ts index 99ae28f1d6f..490cae25319 100644 --- a/packages/shared/src/types/feature-flags.ts +++ b/packages/shared/src/types/feature-flags.ts @@ -43,4 +43,5 @@ export enum FeatureFlagsKeysEnum { IS_CONTROLS_AUTOCOMPLETE_ENABLED = 'IS_CONTROLS_AUTOCOMPLETE_ENABLED', IS_USAGE_ALERTS_ENABLED = 'IS_USAGE_ALERTS_ENABLED', IS_NEW_DASHBOARD_ENABLED = 'IS_NEW_DASHBOARD_ENABLED', + IS_ND_DELAY_DIGEST_EMAIL_ENABLED = 'IS_ND_DELAY_DIGEST_EMAIL_ENABLED', }