From 3edbd22a17f09930e96fe875e2f0766954b2034b Mon Sep 17 00:00:00 2001 From: Konstantinos-Gk Date: Wed, 4 Oct 2023 13:38:41 +0200 Subject: [PATCH 1/2] fix: check ip too --- src/store/region-context.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/region-context.tsx b/src/store/region-context.tsx index 9a2dfa2f579..66a04ec7014 100644 --- a/src/store/region-context.tsx +++ b/src/store/region-context.tsx @@ -93,13 +93,13 @@ export const RegionProvider = ({ children }: RegionProviderProps) => { const p2p_cookie = getP2PCookie() setP2P(p2p_cookie, p2p_config) if (qa_url_region) { - not_available_appgallery_countries.includes(qa_url_region) + not_available_appgallery_countries.includes(qa_url_region || user_ip_country) ? setAppgallerySupported(false) : setAppgallerySupported(true) - not_avalable_appgallery_and_ios_countries.includes(qa_url_region) + not_avalable_appgallery_and_ios_countries.includes(qa_url_region || user_ip_country) ? setAppgalleryIosSupported(false) : setAppgalleryIosSupported(true) - not_available_iOS_countries.includes(qa_url_region) + not_available_iOS_countries.includes(qa_url_region || user_ip_country) ? setIosSupported(false) : setIosSupported(true) } From c3b5f1d1634380fd9e5f396473407802dbdfa209 Mon Sep 17 00:00:00 2001 From: Konstantinos-Gk Date: Wed, 4 Oct 2023 14:14:28 +0200 Subject: [PATCH 2/2] fix: add user ip in if statement --- src/store/region-context.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/region-context.tsx b/src/store/region-context.tsx index 66a04ec7014..237354654f8 100644 --- a/src/store/region-context.tsx +++ b/src/store/region-context.tsx @@ -92,7 +92,7 @@ export const RegionProvider = ({ children }: RegionProviderProps) => { const { clients_country, p2p_config } = website_status const p2p_cookie = getP2PCookie() setP2P(p2p_cookie, p2p_config) - if (qa_url_region) { + if (qa_url_region || user_ip_country) { not_available_appgallery_countries.includes(qa_url_region || user_ip_country) ? setAppgallerySupported(false) : setAppgallerySupported(true)