feat(BOOK-462): Hiding chatbot on german hotels with Dialogshift widget

Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-10-20 10:43:08 +00:00
parent 3e3a7fc423
commit 3257054474
2 changed files with 23 additions and 0 deletions

View File

@@ -26,6 +26,17 @@ export function shouldShowChatbot(
return false
}
const isOnHideRoute = CHATBOT_HIDE_CONDITIONS.routes[lang].some((route) => {
const fullRoute = removeTrailingSlash(
removeMultipleSlashes(`/${lang}${route}`)
)
return cleanPathname === fullRoute
})
if (isOnHideRoute) {
return false
}
if (searchParams) {
const shouldHideOnSearchParams = CHATBOT_HIDE_CONDITIONS.searchParams.some(
({ key, value }) => {