Skip to content

Commit 62c58ef

Browse files
committed
chore: update logic
1 parent cc66907 commit 62c58ef

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

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-
}
56-
57-
const freemiumLimitReached = licenseStatusError?.code === LicensingErrorCodes.ClusterLimitExceeded
58-
5953
if (isFreemium) {
54+
const freemiumLimitReached = licenseStatusError?.code === LicensingErrorCodes.ClusterLimitExceeded
55+
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)