Skip to content

Commit

Permalink
chore: update VersionNavbarItem.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhan007 committed Apr 17, 2024
1 parent 96f0343 commit c487dbc
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import {
function getVersion() {
if (ExecutionEnvironment.canUseDOM) {
if (!location.pathname.includes("nightly") ) {
console.log("v1") // eslint-disable-line
return "v1";
}
console.log("Nightly") // eslint-disable-line
return "Nightly";
}
}
Expand Down Expand Up @@ -63,15 +65,13 @@ function VersionNavbarItemDesktop() {
isDropdownItem
target="_self"
href="https://sap.github.io/ui5-webcomponents/nightly"
onClick={() => { setVersion("Nightly") }}
className={clsx({ 'menu__link--active': version === "Nightly" })}
/>
<NavbarItem
label="v1"
isDropdownItem
target="_self"
href="https://sap.github.io/ui5-webcomponents/"
onClick={() => { setVersion("v1") }}
className={clsx({ 'menu__link--active': version === "v1" })}
/>
</ul>
Expand Down Expand Up @@ -102,15 +102,13 @@ function VersionNavbarItemMobile() {
mobile
href="https://sap.github.io/ui5-webcomponents/nightly"
isDropdownItem
onClick={() => { setVersion("nightly") }}
className={clsx({ "menu__link--active": version === "nightly" })}
/>
<NavbarItem
label="v1"
mobile
href="https://sap.github.io/ui5-webcomponents"
isDropdownItem
onClick={() => { setVersion("v1") }}
className={clsx({ "menu__link--active": version === "v1" })}
/>
</Collapsible>
Expand Down

0 comments on commit c487dbc

Please sign in to comment.