const toggleInfo = (index, event) => {
setVisibleLightIndexes((prev) => {
if (prev.includes(index)) {
return prev.filter((i) => i !== index);
} else {
return [...prev, index];
const clickedElement = event.target.closest(".chauvetLights");
if (clickedElement) {
clickedElement.classList.toggle("expanded");
toggleBackgroundColor(event);
TypeError: Cannot read properties of undefined (reading 'target')
at k (home-OO3WpeNb.js:1:102576)
at onClick (home-OO3WpeNb.js:1:104620)
at Object.Em (index-h-qGlws7.js:38:9852)
at km (index-h-qGlws7.js:38:10006)
at Cm (index-h-qGlws7.js:38:10063)
at Wa (index-h-qGlws7.js:38:31422)
at fd (index-h-qGlws7.js:38:31839)
at index-h-qGlws7.js:38:36751
at Vs (index-h-qGlws7.js:41:36768)
at Df (index-h-qGlws7.js:38:8988)