From 62ed1793e07125bba55dc678de304c0a6d66a614 Mon Sep 17 00:00:00 2001 From: Henry Hein Date: Wed, 30 Oct 2024 16:58:55 +0800 Subject: [PATCH] fix: layout issue --- src/javascript/app/base/header.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/javascript/app/base/header.js b/src/javascript/app/base/header.js index 0e6a39e6d4e..8dacaac3622 100644 --- a/src/javascript/app/base/header.js +++ b/src/javascript/app/base/header.js @@ -73,13 +73,11 @@ const Header = (() => { const topbar_whatsapp = getElementById('topbar-whatsapp'); const whatsapp_mobile_drawer = getElementById('whatsapp-mobile-drawer'); - const livechatDisplay = cs_chat_livechat ? 'inline-flex' : 'none'; - mobile_menu_livechat.style.display = livechatDisplay; - livechat.style.display = livechatDisplay; + mobile_menu_livechat.style.display = cs_chat_livechat ? 'flex' : 'none'; + livechat.style.display = cs_chat_livechat ? 'inline-flex' : 'none'; - const whatsappDisplay = cs_chat_whatsapp ? 'inline-flex' : 'none'; - topbar_whatsapp.style.display = whatsappDisplay; - whatsapp_mobile_drawer.style.display = whatsappDisplay; + topbar_whatsapp.style.display = cs_chat_whatsapp ? 'inline-flex' : 'none'; + whatsapp_mobile_drawer.style.display = cs_chat_whatsapp ? 'flex' : 'none'; }) // eslint-disable-next-line no-console .catch(error => console.error('Error fetching feature flags:', error));