Skip to content

Commit

Permalink
Meenu/fix: fixed pr comments (#761)
Browse files Browse the repository at this point in the history
* fix: fixed pr comments

* fix: fixed text align centered for before purchase section
  • Loading branch information
meenakshi-deriv authored Aug 5, 2024
1 parent 4040ddc commit 05a7eb2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
11 changes: 8 additions & 3 deletions src/javascript/app/pages/loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
5 changes: 0 additions & 5 deletions src/javascript/app/pages/trade/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/javascript/app/pages/trade/purchase/purchase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,19 @@ const Purchase = () => {
<div className='table-box'>
{data?.pr_tablePayoutValue && (
<div className='table-item'>
<Text size='sm' bold>{data?.pr_tablePayout}</Text>
<Text size='sm' centered bold>{data?.pr_tablePayout}</Text>
<Text size='sm' centered >{parseData(data.pr_tablePayoutValue)}</Text>
</div>
)}
{ data?.pr_tableCostValue && (
<div className='table-item'>
<Text size='sm' bold>{data?.pr_tableCost}</Text>
<Text size='sm' centered bold>{data?.pr_tableCost}</Text>
<Text size='sm' centered >{parseData(data.pr_tableCostValue)}</Text>
</div>
)}
{ data?.pr_tableProfitValue && data?.pr_showTableProfit && (
<div className='table-item'>
<Text size='sm' bold>{data?.pr_tableProfit}</Text>
<Text size='sm' centered bold>{data?.pr_tableProfit}</Text>
<Text size='sm' centered>{parseData(data.pr_tableProfitValue)}</Text>
</div>
)}
Expand Down

0 comments on commit 05a7eb2

Please sign in to comment.