Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Revert "Revert "Meenu/redirect row users"" #7186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/javascript/app/common/redirect_banner.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const Cookies = require('js-cookie');
const DerivBanner = require('./deriv_banner');
const BinarySocket = require('../base/socket');
const State = require('../../_common/storage').State;
Expand All @@ -12,14 +13,31 @@ const RedirectBanner = (() => {
const eu_country = isEuCountrySelected(Client.get('residence')) || isEuCountrySelected(State.getResponse('website_status.clients_country'));
if (eu_country) {
handleRedirect();
} else {
handleRedirectROW();
}

});

};

const handleRedirect = () => {
window.location.href = '/move-to-deriv/';
window.location.href = 'https://www.binary.bot/movetoderiv.html';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This url are changed


};

const handleRedirectROW = () => {

// Check if param have ?binary-com-lp
const redirectBinary = new URLSearchParams(window.location.search);

if (redirectBinary.has('binary-com-lp') || Cookies.get('binary-com-show')){
// Set cookie if they wanted to stay at binary.com and no redirect
Cookies.set('binary-com-show', true, { expires: 7 });
} else {
window.location.replace('https://www.binary.bot/movetoderiv.html');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

}

};

const loginOnLoad = () => {
Expand Down