Skip to content

Commit

Permalink
added a comment for GenericFeaturesView,when to display
Browse files Browse the repository at this point in the history
  • Loading branch information
jayeshmangwani committed Jan 13, 2025
1 parent e1ad3d2 commit 84bc92c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/workspace/upgrade/UpgradeIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<GenericFeaturesView
Expand Down

0 comments on commit 84bc92c

Please sign in to comment.