Skip to content

Commit

Permalink
Merge pull request #168 from moiz-deriv/moiz/prime-whatsapp-removal
Browse files Browse the repository at this point in the history
fix: updated chat logic to hide whatsapp on deriv prime pages
  • Loading branch information
prince-deriv authored Oct 8, 2024
2 parents 5a2a9e9 + a445a45 commit 3f02c06
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 3f02c06

Please sign in to comment.