Skip to content

Commit 6ecf7f5

Browse files
committed
chore: update version to 1.9.8-beta-7 and refactor DevtronLicenseCard component
1 parent e622e2a commit 6ecf7f5

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
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.9.8-beta-6",
3+
"version": "1.9.8-beta-7",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/DevtronLicenseCard/DevtronLicenseCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
ENTERPRISE_SUPPORT_LINK,
1010
getHandleOpenURL,
1111
LicenseStatus,
12-
useTheme,
1312
} from '@Shared/index'
1413
import { Button, ButtonVariantType } from '../Button'
1514
import { Icon } from '../Icon'
@@ -26,9 +25,9 @@ export const DevtronLicenseCard = ({
2625
licenseStatus,
2726
isTrial,
2827
ttl,
28+
appTheme,
2929
}: DevtronLicenseCardProps) => {
3030
const { bgColor, textColor } = getLicenseColorsAccordingToStatus(licenseStatus)
31-
const { appTheme } = useTheme()
3231
const remainingTime = getTTLInHumanReadableFormat(ttl)
3332
const remainingTimeString = ttl < 0 ? `Expired ${remainingTime} ago` : `${remainingTime} remaining`
3433
const isLicenseValid = licenseStatus !== LicenseStatus.EXPIRED

src/Shared/Components/DevtronLicenseCard/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/index'
1+
import { AppThemeType, DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/index'
22

33
export enum LicenseStatus {
44
ACTIVE = 'ACTIVE',
@@ -12,6 +12,7 @@ export type DevtronLicenseCardProps = {
1212
ttl: number
1313
licenseStatus: LicenseStatus
1414
isTrial: boolean
15+
appTheme: AppThemeType
1516
} & (
1617
| {
1718
licenseKey: string

src/Shared/Components/DevtronLicenseCard/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const getDevtronLicenseStatus = ({
3333
export const parseDevtronLicenseDTOIntoLicenseCardData = <isCentralDashboard extends boolean = false>(
3434
licenseDTO: DevtronLicenseDTO<isCentralDashboard>,
3535
currentUserEmail?: isCentralDashboard extends true ? string : never,
36-
): DevtronLicenseCardProps => {
36+
): Omit<DevtronLicenseCardProps, 'appTheme'> => {
3737
const { isTrial, expiry, ttl, reminderThreshold, organisationMetadata, license, claimedByUserDetails } =
3838
licenseDTO || {}
3939

0 commit comments

Comments
 (0)