Skip to content

Commit

Permalink
chore: popup load
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Jul 17, 2024
1 parent 77fdde1 commit a7b6036
Show file tree
Hide file tree
Showing 9 changed files with 591 additions and 19 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@binary-com/binary-document-uploader": "^2.4.4",
"@binary-com/binary-style": "^0.2.26",
"@binary-com/webtrader-charts": "^0.6.1",
"@deriv-com/quill-ui": "^1.13.12",
"@deriv-com/quill-ui": "^1.13.15",
"@deriv/quill-icons": "^1.23.1",
"@livechat/customer-sdk": "4.0.2",
"canvas-toBlob": "1.0.0",
Expand Down
8 changes: 8 additions & 0 deletions src/javascript/app/base/clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,17 @@ const Clock = (() => {
});
};

const getLocalTime = (time) => {
const gmt_time_str = time.replace('\n', ' ');
const local_time = moment.utc(gmt_time_str, 'YYYY-MM-DD HH:mm:ss').local();

return local_time.format('YYYY-MM-DD HH:mm:ss Z');
};

return {
startClock,
showLocalTimeOnHover,
getLocalTime,
setExternalTimer: (func) => { fncExternalTimer = func; },
};
})();
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/app/common/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const Guide = (() => {
nextButton : btn_next,
},
{
selector : '#contract_prices_container',
selector : '.quill-purchase-section',
description: `<h1>${localize('Step')} 4</h1>${localize('Predict the direction<br />and purchase')}`,
event_type : 'next',
nextButton : btn_finish,
Expand Down
21 changes: 21 additions & 0 deletions src/javascript/app/pages/trade/portal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { useEffect, useRef } from 'react';
import ReactDOM from 'react-dom';

const Portal = ({ children }) => {
const elRef = useRef(document.createElement('div'));

useEffect(() => {
const el = elRef.current;
document.body.appendChild(el);
return () => {
document.body.removeChild(el);
};
}, []);

return ReactDOM.createPortal(
children,
elRef.current
);
};

export default Portal;
277 changes: 271 additions & 6 deletions src/javascript/app/pages/trade/purchase.jsx

Large diffs are not rendered by default.

Loading

0 comments on commit a7b6036

Please sign in to comment.