Skip to content

Commit

Permalink
fix: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-deriv committed Oct 28, 2024
1 parent 5c19cac commit 2363d4a
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/javascript/app/base/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Header = (() => {
fnc_enter: ['requestFullscreen', 'webkitRequestFullscreen', 'mozRequestFullScreen', 'msRequestFullscreen'],
fnc_exit : ['exitFullscreen', 'webkitExitFullscreen', 'mozCancelFullScreen', 'msExitFullscreen'],
};

const onLoad = () => {
DerivIFrame.init();
populateAccountsList();
Expand Down Expand Up @@ -73,21 +73,13 @@ const Header = (() => {
const topbar_whatsapp = getElementById('topbar-whatsapp');
const whatsapp_mobile_drawer = getElementById('whatsapp-mobile-drawer');

if (cs_chat_livechat) {
mobile_menu_livechat.style.display = 'inline-flex';
livechat.style.display = 'inline-flex';
} else {
mobile_menu_livechat.style.display = 'none';
livechat.style.display = 'none';
}

if (cs_chat_whatsapp) {
topbar_whatsapp.style.display = 'inline-flex';
whatsapp_mobile_drawer.style.display = 'inline-flex';
} else {
topbar_whatsapp.style.display = 'none';
whatsapp_mobile_drawer.style.display = 'none';
}
const livechatDisplay = cs_chat_livechat ? 'inline-flex' : 'none';
mobile_menu_livechat.style.display = livechatDisplay;
livechat.style.display = livechatDisplay;

const whatsappDisplay = cs_chat_whatsapp ? 'inline-flex' : 'none';
topbar_whatsapp.style.display = whatsappDisplay;
whatsapp_mobile_drawer.style.display = whatsappDisplay;
})
// eslint-disable-next-line no-console
.catch(error => console.error('Error fetching feature flags:', error));
Expand Down

0 comments on commit 2363d4a

Please sign in to comment.