From c487dbcc5d053803d645afd58eac5db9605ba4db Mon Sep 17 00:00:00 2001 From: ilhan007 Date: Wed, 17 Apr 2024 18:54:05 +0300 Subject: [PATCH] chore: update VersionNavbarItem.js --- .../website/src/components/NavbarItems/VersionNavbarItem.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/website/src/components/NavbarItems/VersionNavbarItem.js b/packages/website/src/components/NavbarItems/VersionNavbarItem.js index 651abfb82008..d03b29014af1 100644 --- a/packages/website/src/components/NavbarItems/VersionNavbarItem.js +++ b/packages/website/src/components/NavbarItems/VersionNavbarItem.js @@ -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"; } } @@ -63,7 +65,6 @@ function VersionNavbarItemDesktop() { isDropdownItem target="_self" href="https://sap.github.io/ui5-webcomponents/nightly" - onClick={() => { setVersion("Nightly") }} className={clsx({ 'menu__link--active': version === "Nightly" })} /> { setVersion("v1") }} className={clsx({ 'menu__link--active': version === "v1" })} /> @@ -102,7 +102,6 @@ function VersionNavbarItemMobile() { mobile href="https://sap.github.io/ui5-webcomponents/nightly" isDropdownItem - onClick={() => { setVersion("nightly") }} className={clsx({ "menu__link--active": version === "nightly" })} /> { setVersion("v1") }} className={clsx({ "menu__link--active": version === "v1" })} />