diff --git a/frontend/src/component/changeRequest/ProjectChangeRequests/ProjectChangeRequests.tsx b/frontend/src/component/changeRequest/ProjectChangeRequests/ProjectChangeRequests.tsx
index c8d4f72bbd..51df5cc195 100644
--- a/frontend/src/component/changeRequest/ProjectChangeRequests/ProjectChangeRequests.tsx
+++ b/frontend/src/component/changeRequest/ProjectChangeRequests/ProjectChangeRequests.tsx
@@ -19,7 +19,7 @@ export const ProjectChangeRequests = () => {
if (isOss() || isPro()) {
return (
-
+
);
}
diff --git a/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx b/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx
index 1e167c1867..dd217ccd28 100644
--- a/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx
+++ b/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx
@@ -46,17 +46,20 @@ enum FeaturePlan {
}
const PremiumFeatures = {
- ['Adding new projects']: {
+ 'adding-new-projects': {
plan: FeaturePlan.PRO,
url: '',
+ label: 'Adding new projects',
},
- ['Access']: {
+ access: {
plan: FeaturePlan.PRO,
url: 'https://docs.getunleash.io/reference/rbac',
+ label: 'Access',
},
- ['Change Requests']: {
+ 'change-requests': {
plan: FeaturePlan.ENTERPRISE,
url: 'https://docs.getunleash.io/reference/change-requests',
+ label: 'Change Requests',
},
};
@@ -70,22 +73,22 @@ export interface PremiumFeatureProps {
}
export const PremiumFeature = ({ feature, tooltip }: PremiumFeatureProps) => {
- const { url, plan } = PremiumFeatures[feature];
+ const { url, plan, label } = PremiumFeatures[feature];
const tracker = usePlausibleTracker();
const handleClick = () => {
tracker.trackEvent('upgrade_plan_clicked', {
- props: { feature },
+ props: { feature: label },
});
};
const featureLabel = Boolean(url) ? (
- {feature}
+ {label}
) : (
- feature
+ label
);
const featureMessage = (
@@ -96,6 +99,8 @@ export const PremiumFeature = ({ feature, tooltip }: PremiumFeatureProps) => {
>
);
+ const upgradeUrl = `${UPGRADE_URL}?feature=${feature}`;
+
return (
@@ -114,7 +119,7 @@ export const PremiumFeature = ({ feature, tooltip }: PremiumFeatureProps) => {
@@ -137,7 +142,7 @@ export const PremiumFeature = ({ feature, tooltip }: PremiumFeatureProps) => {