From 2e74958101cc098312490794cd3586011b2e287b Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Mon, 10 Feb 2025 18:48:07 +0000 Subject: [PATCH] Remove unused country code selection (#37397) --- source/_includes/custom/buy-dialog.html | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source/_includes/custom/buy-dialog.html b/source/_includes/custom/buy-dialog.html index 09dd8245391..b23bd14a2f5 100644 --- a/source/_includes/custom/buy-dialog.html +++ b/source/_includes/custom/buy-dialog.html @@ -116,9 +116,6 @@ let tabContents = dialog.querySelectorAll('.ha-buy-dialog-tab-content'); let timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; let region = timezone.split('/')[0].toLowerCase(); - let locale = Intl.DateTimeFormat().resolvedOptions().locale; - let countryCode = locale.split('-')[1].toLowerCase(); - let defaultTab = dialog.querySelector(`.ha-buy-dialog-sidebar-tab[data-tab="#${region}"]`); if (defaultTab) { @@ -128,11 +125,6 @@ defaultTab.classList.add('active'); let tabContent = document.querySelector(defaultTab.getAttribute('data-tab')); tabContent.classList.add('active'); - - let country = tabContent.querySelector(`.ha-buy-dialog-distributor-country[data-code="${countryCode}"]`); - if (country) { - country.scrollIntoView({ behavior: 'instant', block: 'center' }); - } } } - \ No newline at end of file +