Skip to content

Commit c80041e

Browse files
committed
fix: make nav tab reactive
1 parent 1d8942d commit c80041e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

assets/apps/dashboard/src/Components/Header.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ const HeaderTopBar = ({ currentTab, setTab }) => {
111111
};
112112

113113
const Navigation = ({ setTab, currentTab }) => {
114+
const { isLicenseValid } = useLicenseData();
115+
114116
return (
115117
<div className="border-b border-gray-200">
116118
<Container>
@@ -119,6 +121,10 @@ const Navigation = ({ setTab, currentTab }) => {
119121
if (!label) {
120122
return null;
121123
}
124+
// Hide "Get Neve Pro" tab for users with valid licenses
125+
if (slug === 'get-neve-pro' && isLicenseValid) {
126+
return null;
127+
}
122128
const itemClasses = cn([
123129
'relative px-4 py-3 font-medium border-b-2',
124130
{

assets/apps/dashboard/src/utils/common.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ if (neveDash.pro || neveDash.hasOldPro) {
5757
delete tabs['free-pro'];
5858
}
5959

60-
// Only show "Get Neve Pro" tab for users without valid licenses
61-
if (neveDash.pro && neveDash.license && 'valid' === neveDash.license.valid) {
62-
delete tabs['get-neve-pro'];
63-
}
64-
6560
if (neveDash.whiteLabel) {
6661
delete tabs.changelog;
6762
if (neveDash.whiteLabel.hideStarterSites) {

0 commit comments

Comments
 (0)