From 84bc92cd712e6b9ba2760dce4ea50a7661e2110d Mon Sep 17 00:00:00 2001 From: jayeshmangwani Date: Mon, 13 Jan 2025 14:14:00 +0530 Subject: [PATCH] added a comment for GenericFeaturesView,when to display --- src/pages/workspace/upgrade/UpgradeIntro.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/workspace/upgrade/UpgradeIntro.tsx b/src/pages/workspace/upgrade/UpgradeIntro.tsx index fbcaa29546b9..aa5601bad022 100644 --- a/src/pages/workspace/upgrade/UpgradeIntro.tsx +++ b/src/pages/workspace/upgrade/UpgradeIntro.tsx @@ -46,6 +46,15 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi return `${convertToShortDisplayString(upgradePrice, upgradeCurrency)} `; }, [preferredCurrency, isCategorizing]); + /** + * + * If the feature is null or there is no policyID, it indicates the user is not associated with any specific workspace. + * In this case, the generic upgrade view should be shown. + * However, the policyID check is only necessary when the user is not coming from the "Categorize" option. + * The "isCategorizing" flag is set to true when the user accesses the "Categorize" option in the Self-DM whisper. + * In such scenarios, a separate Categories upgrade UI is displayed. + * + */ if (!feature || (!isCategorizing && !policyID)) { return (