-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5450 from novuhq/nv-3559-show-the-upgrade-plan-in…
…formation Nv 3559 show the upgrade plan information
- Loading branch information
Showing
4 changed files
with
116 additions
and
34 deletions.
There are no files selected for viewing
Submodule .source
updated
from c873c1 to 68fc4b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/web/src/components/layout/components/UpgradePlanBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FeatureFlagsKeysEnum } from '@novu/shared'; | ||
import { IS_DOCKER_HOSTED, useFeatureFlag } from '@novu/shared-web'; | ||
|
||
export function UpgradePlanBanner({ FeatureActivatedBanner }: { FeatureActivatedBanner: React.ReactNode }) { | ||
const isEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_BILLING_REVERSE_TRIAL_ENABLED); | ||
|
||
if (IS_DOCKER_HOSTED) { | ||
return null; | ||
} | ||
|
||
if (!isEnabled) { | ||
return null; | ||
} | ||
|
||
try { | ||
const module = require('@novu/ee-billing-web'); | ||
const Component = module.UpgradePlanBanner; | ||
|
||
return <Component FeatureActivatedBanner={FeatureActivatedBanner} />; | ||
} catch (e) {} | ||
|
||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters