Skip to content

Commit 2f2182a

Browse files
fix: add new license while white label enabled
1 parent 982c698 commit 2f2182a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

assets/apps/dashboard/src/Components/Content/Sidebar/LicenseCard.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ const LicenseCard = () => {
4848
);
4949
};
5050

51-
if (whiteLabel && whiteLabel.hideLicense) {
51+
if (whiteLabel && whiteLabel.hideLicense && 'valid' === valid) {
5252
return null;
5353
}
5454

55+
const isValid = 'valid' === valid;
5556
const isOrWasValid = ['valid', 'active_expired', 'expired'].includes(valid);
5657

5758
const getStatusLabel = () => {
@@ -63,7 +64,7 @@ const LicenseCard = () => {
6364
};
6465

6566
if (!status) {
66-
return isOrWasValid
67+
return isValid
6768
? __('Deactivate', 'neve')
6869
: __('Activate', 'neve');
6970
}
@@ -94,13 +95,13 @@ const LicenseCard = () => {
9495
id="license-field"
9596
name="license-field"
9697
className="flex-grow rounded !border-gray-300 text-sm !py-1 !px-2"
97-
disabled={isOrWasValid}
98+
disabled={isValid}
9899
onChange={(e) => {
99100
const keyToSet = e.target.value.replace(/\s+/g, '');
100101
setKey(keyToSet);
101102
}}
102103
value={
103-
isOrWasValid
104+
isValid
104105
? '******************************' +
105106
key.slice(-5)
106107
: key

0 commit comments

Comments
 (0)