From 171f7726da81afa9f9ba94be52edb7da3c513e73 Mon Sep 17 00:00:00 2001 From: Nuzhy-Deriv Date: Mon, 25 Nov 2024 19:46:50 +0800 Subject: [PATCH] fix: revert passing user data --- src/javascript/app/hooks/useInterComChat.js | 3 +-- src/javascript/app/pages/livechat.jsx | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/javascript/app/hooks/useInterComChat.js b/src/javascript/app/hooks/useInterComChat.js index 0d879f31b9c..b0caf3492ab 100644 --- a/src/javascript/app/hooks/useInterComChat.js +++ b/src/javascript/app/hooks/useInterComChat.js @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { useScript } from 'usehooks-ts'; -const useInterComChat = (token, flag, userData) => { +const useInterComChat = (token, flag) => { const intercom_script = 'https://static.deriv.com/scripts/intercom/v1.0.1.js'; const script_status = useScript(flag ? intercom_script : null); @@ -11,7 +11,6 @@ const useInterComChat = (token, flag, userData) => { window.DerivInterCom.initialize({ token, hideLauncher: true, - userData, }); }, [ flag, diff --git a/src/javascript/app/pages/livechat.jsx b/src/javascript/app/pages/livechat.jsx index c472afa6097..4d205be49a3 100644 --- a/src/javascript/app/pages/livechat.jsx +++ b/src/javascript/app/pages/livechat.jsx @@ -26,13 +26,7 @@ const LiveChat = ({ cs_live_chat }) => { }); const freshChat = useFreshChat(token, isFreshChatEnabled); - const userData = client_data?.email - ? { - name : client_data.email.split('@')[0], - email: client_data.email, - } - : null; - useInterComChat(token, isICEnabled, userData); + useInterComChat(token, isICEnabled); if (!isFreshChatEnabled && !isICEnabled && !cs_live_chat) return null; getElementById('livechat').style.display =