Add files via upload

This commit is contained in:
Tomáš Dvořák
2025-05-23 10:10:12 +02:00
committed by GitHub
parent 8fd09d5cc5
commit 200bfa24cd
+9 -4
View File
@@ -172,13 +172,18 @@
} }
function showContactsList() { function showContactsList() {
document.getElementById('contactsList').classList.remove('hidden'); const contactsList = document.getElementById('contactsList');
document.getElementById('error').classList.add('hidden'); const errorElement = document.getElementById('error');
if (contactsList) contactsList.classList.remove('hidden');
if (errorElement) errorElement.classList.add('hidden');
// Show default tab (main contacts) if none active // Show default tab (main contacts) if none active
const mainBtn = document.querySelector('.switcher-btn[data-type="main"]');
const activeBtn = document.querySelector('.switcher-btn.active'); const activeBtn = document.querySelector('.switcher-btn.active');
if (!activeBtn) {
document.querySelector('.switcher-btn[data-type="main"]').classList.add('active'); if (!activeBtn && mainBtn) {
mainBtn.classList.add('active');
} }
filterContacts(); filterContacts();