Skip to content

Commit

Permalink
Merge branch 'develop' into fix/client-not-getting-new-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Mar 2, 2023
2 parents f61c45a + fd33a0f commit 3883550
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/client/views/hooks/useUpgradeTabParams.ts
Expand Up @@ -13,7 +13,7 @@ export const useUpgradeTabParams = (): { tabType: UpgradeTabVariant | false; tri
const { data: registrationStatusData, isSuccess: isSuccessRegistrationStatus } = useRegistrationStatus();

const registered = registrationStatusData?.registrationStatus?.workspaceRegistered ?? false;
const hasValidLicense = (licensesData?.licenses?.length ?? 0) > 0;
const hasValidLicense = licensesData?.licenses.some((licence) => licence.modules.length > 0) ?? false;
const hadExpiredTrials = cloudWorkspaceHadTrial ?? false;

const trialLicense = licensesData?.licenses?.find(({ meta }) => meta?.trial);
Expand Down
3 changes: 3 additions & 0 deletions apps/meteor/lib/upgradeTab.ts
Expand Up @@ -19,11 +19,14 @@ export const getUpgradeTabType = ({
if (hadExpiredTrials) {
return 'upgrade-your-plan';
}

if (registered) {
return 'go-fully-featured-registered';
}

return 'go-fully-featured';
}

if (isTrial) {
return 'trial-enterprise';
}
Expand Down

0 comments on commit 3883550

Please sign in to comment.