feat(BOOK-462): Hiding chatbot on german hotels with Dialogshift widget
Approved-by: Linus Flood
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user