Skip to content

Commit

Permalink
fix: updated chat logic to hide whatsapp on deriv prime pages
Browse files Browse the repository at this point in the history
  • Loading branch information
moiz-deriv committed Oct 8, 2024
1 parent ae7bf1b commit a445a45
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/footer/liveChatFeatureFlag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ function fetchChatData() {
: "hidden";
}
const isHelpCentre = window.location.pathname.includes("/help-centre");
const isPrime = window.location.pathname.includes("/deriv-prime");

if (isPrime) {
const whatappChatBtns = document.querySelectorAll(".whatsapp_chat");
whatappChatBtns.forEach((btn) => {
btn.style.visibility = "hidden";
});
}

if (isHelpCentre) {
const liveChatBtns = document.querySelectorAll(".livechatbtn");
Expand Down

0 comments on commit a445a45

Please sign in to comment.