Merged in feature/SW-2320-languagebased-hide-for-next-release (pull request #1937)
Language based alternative to HIDE_FOR_NEXT_RELEASE Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -16,6 +16,7 @@ import useDropdownStore from "@/stores/main-menu"
|
||||
import { IconName } from "@/components/Icons/iconName"
|
||||
import LanguageSwitcher from "@/components/LanguageSwitcher"
|
||||
import { useHandleKeyUp } from "@/hooks/useHandleKeyUp"
|
||||
import { useIsLangLive } from "@/hooks/useIsLangLive"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { getCurrentWebUrl } from "@/utils/url"
|
||||
|
||||
@@ -32,6 +33,7 @@ export default function MobileMenu({
|
||||
topLink,
|
||||
isLoggedIn,
|
||||
}: React.PropsWithChildren<MobileMenuProps>) {
|
||||
const isLangLive = useIsLangLive()
|
||||
const lang = useLang()
|
||||
const intl = useIntl()
|
||||
const {
|
||||
@@ -76,7 +78,7 @@ export default function MobileMenu({
|
||||
})
|
||||
|
||||
const baseUrl = env.NEXT_PUBLIC_PUBLIC_URL || "https://www.scandichotels.com"
|
||||
const findMyBookingUrl = env.NEXT_PUBLIC_HIDE_FOR_NEXT_RELEASE
|
||||
const findMyBookingUrl = !isLangLive
|
||||
? getCurrentWebUrl({
|
||||
path: findMyBookingCurrentWebPath[lang],
|
||||
lang,
|
||||
|
||||
Reference in New Issue
Block a user