feat(BOOK-577): Added chatbot functionality for SE
Approved-by: Bianca Widstam
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import {
|
||||
removeMultipleSlashes,
|
||||
removeTrailingSlash,
|
||||
@@ -5,8 +6,6 @@ import {
|
||||
|
||||
import { CHATBOT_HIDE_CONDITIONS, CHATBOT_SHOW_ROUTES } from "./constants"
|
||||
|
||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||
|
||||
export function shouldShowChatbot(
|
||||
pathname: string,
|
||||
searchParams: URLSearchParams | null,
|
||||
@@ -51,3 +50,17 @@ export function shouldShowChatbot(
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
export function getChatbotKey(lang: Lang) {
|
||||
switch (lang) {
|
||||
case Lang.sv:
|
||||
return "6008f930-ad4f-4fd2-8d7e-b58e65afe123"
|
||||
case Lang.no:
|
||||
case Lang.da:
|
||||
case Lang.fi:
|
||||
case Lang.de:
|
||||
case Lang.en:
|
||||
default:
|
||||
return "910bd27a-7472-43a1-bcfc-955b41adc3e7"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user