diff --git a/apps/scandic-web/components/ChatbotScript/constants.ts b/apps/scandic-web/components/ChatbotScript/constants.ts index 17f2f5abe..366081b45 100644 --- a/apps/scandic-web/components/ChatbotScript/constants.ts +++ b/apps/scandic-web/components/ChatbotScript/constants.ts @@ -15,4 +15,16 @@ export const CHATBOT_SHOW_ROUTES = { export const CHATBOT_HIDE_CONDITIONS = { searchParams: [{ key: "view", value: "map" }], + routes: { + [Lang.en]: [ + "/hotels/scandic-berlin-potsdamer-platz", + "/hotels/scandic-berlin-kurfurstendamm", + "/hotels/scandic-hamburg-emporio", + ], + [Lang.sv]: [], + [Lang.no]: [], + [Lang.fi]: [], + [Lang.da]: [], + [Lang.de]: [], + }, } as const diff --git a/apps/scandic-web/components/ChatbotScript/utils.ts b/apps/scandic-web/components/ChatbotScript/utils.ts index 2fb484fa5..0e191e531 100644 --- a/apps/scandic-web/components/ChatbotScript/utils.ts +++ b/apps/scandic-web/components/ChatbotScript/utils.ts @@ -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 }) => {