Skip to content

Commit ac8d45c

Browse files
authored
Merge pull request #859 from devtron-labs/fix/freemium-license
fix: do not check expiry for freemium
2 parents 88bb630 + 62c58ef commit ac8d45c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.19.1",
3+
"version": "1.19.2",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/License/DevtronLicenseCard.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ const LicenseCardSubText = ({
5050
licenseStatus,
5151
licenseStatusError,
5252
}: Pick<DevtronLicenseCardProps, 'isFreemium' | 'licenseStatus' | 'licenseStatusError'>) => {
53-
if (licenseStatus === LicenseStatus.ACTIVE && !isFreemium) {
54-
return null
55-
}
53+
if (isFreemium) {
54+
const freemiumLimitReached = licenseStatusError?.code === LicensingErrorCodes.ClusterLimitExceeded
5655

57-
const freemiumLimitReached = licenseStatusError?.code === LicensingErrorCodes.ClusterLimitExceeded
58-
59-
if (licenseStatus === LicenseStatus.ACTIVE && isFreemium) {
6056
return (
6157
<div className="p-16 fs-13 lh-1-5 flexbox-col dc__gap-8">
6258
<div className="flexbox dc__gap-8 dc__content-space fs-13 fw-4 lh-20 cn-9">
@@ -92,6 +88,12 @@ const LicenseCardSubText = ({
9288
)
9389
}
9490

91+
// Cases when not freemium
92+
93+
if (licenseStatus === LicenseStatus.ACTIVE) {
94+
return null
95+
}
96+
9597
const isLicenseExpired = licenseStatus === LicenseStatus.EXPIRED
9698

9799
return (

0 commit comments

Comments
 (0)