From 7ef2c1075c5c6eba3e688d389aa046143749d2cd Mon Sep 17 00:00:00 2001 From: moiz-deriv Date: Wed, 9 Oct 2024 17:20:56 +0800 Subject: [PATCH] fix: updated style of livechat wrapper when whatsapp is removed --- src/js/footer/liveChatFeatureFlag/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/footer/liveChatFeatureFlag/index.js b/src/js/footer/liveChatFeatureFlag/index.js index e9db244..0f62b07 100644 --- a/src/js/footer/liveChatFeatureFlag/index.js +++ b/src/js/footer/liveChatFeatureFlag/index.js @@ -5,6 +5,7 @@ let is_whatapp_visible = false; function fetchChatData() { const liveChatWrapper = document.getElementById("live_chat-wrapper"); + try { const dataRef = ref(db, "remote_config/deriv-com/chat"); onValue( @@ -34,6 +35,7 @@ function fetchChatData() { const isPrime = window.location.pathname.includes("/deriv-prime"); if (isPrime) { + liveChatWrapper.style.flexDirection = "column-reverse"; const whatappChatBtns = document.querySelectorAll(".whatsapp_chat"); whatappChatBtns.forEach((btn) => { btn.style.visibility = "hidden";