From 0e4b7113d22c27ca080514585a8dd6729072988a Mon Sep 17 00:00:00 2001 From: number-nine Date: Tue, 4 Jul 2023 14:46:26 +0300 Subject: [PATCH] fixed --- src/js/auth/modal-auth/eventsProcessor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/auth/modal-auth/eventsProcessor.js b/src/js/auth/modal-auth/eventsProcessor.js index a51461a..105a3e1 100644 --- a/src/js/auth/modal-auth/eventsProcessor.js +++ b/src/js/auth/modal-auth/eventsProcessor.js @@ -17,7 +17,7 @@ const menuAuthRootListRef = document.querySelectorAll('.auth-menu-root'); // const menuAuthRootListRef = document.querySelector('.auth-menu-root'); const themeSelectorRef = document.querySelector('#toggle-theme'); -console.log(menuAuthRootListRef); +// console.log(menuAuthRootListRef); let _theme = 'light'; let _mode = 'signin'; @@ -36,8 +36,8 @@ onAuthStateChanged(auth, user => { }); const bindButtonEvents = cb => { - const modalAuthButtonRef = document.querySelector('.modal-auth-button'); - modalAuthButtonRef.addEventListener('click', cb); + const modalAuthButtonListRef = document.querySelectorAll('.modal-auth-button'); + modalAuthButtonListRef.forEach(elem => elem.addEventListener('click', cb)); }; export const initAuth = () => {