File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments