Skip to content

Commit

Permalink
Merge pull request #47 from deriv-com/ako/populate-footer-after-ws-call
Browse files Browse the repository at this point in the history
fix: remove extra clientsCountryFromCookie
  • Loading branch information
ali-hosseini-deriv authored Jul 1, 2024
2 parents 4d7c4e9 + bf0d64d commit 266e771
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/js/footer/clientsCountryCookie/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ async function fetchCountryAndPopulateFooter() {
const text = await response.text();
const CloudflareCountry = Object.fromEntries(
text.split("\n").map(v => v.split("=", 2))
).loc;

const clientsCountryFromCookie = getCookie("clients_country");

).loc.toLowerCase();

if (CloudflareCountry !== clientsCountryFromCookie) {
setCookie("clients_country", CloudflareCountry, 30);
}

populateFooterComponent();
} catch (error) {
console.error('Error:', error);
Expand Down

0 comments on commit 266e771

Please sign in to comment.