diff --git a/src/javascript/app/pages/loader.jsx b/src/javascript/app/pages/loader.jsx index 3bc7146c3f0..4a73558f9f2 100644 --- a/src/javascript/app/pages/loader.jsx +++ b/src/javascript/app/pages/loader.jsx @@ -55,11 +55,16 @@ const Loader = () => { },[hasContractChange]); useEffect(() => { - window.addEventListener('load', () => { - if (page !== 'Trade'){ + const handleLoad = () => { + if (page !== 'Trade') { setLoading(false); } - }); + }; + + window.addEventListener('load', handleLoad); + return () => { + window.removeEventListener('load', handleLoad); + }; },[]); if (loading){ diff --git a/src/javascript/app/pages/trade/analysis.js b/src/javascript/app/pages/trade/analysis.js index b7af6eb347f..25f28886fc0 100644 --- a/src/javascript/app/pages/trade/analysis.js +++ b/src/javascript/app/pages/trade/analysis.js @@ -109,12 +109,7 @@ const TradingAnalysis = (() => { } if (current_tab) { const el_to_show = getElementById(current_tab); - const el_mobile_tab_header = getElementById('tab_mobile_header'); - TabSelector.slideSelector(tab_selector_id, el_to_show); - if (el_mobile_tab_header) { - // el_mobile_tab_header.innerHTML = el_to_show.firstChild.innerHTML; - } } // workaround for underline during window resize diff --git a/src/javascript/app/pages/trade/purchase/purchase.jsx b/src/javascript/app/pages/trade/purchase/purchase.jsx index ace858283dd..bc5f9a12855 100644 --- a/src/javascript/app/pages/trade/purchase/purchase.jsx +++ b/src/javascript/app/pages/trade/purchase/purchase.jsx @@ -284,19 +284,19 @@ const Purchase = () => {