diff --git a/src/Components/Curtains/Curtains.tsx b/src/Components/Curtains/Curtains.tsx index cc2dfcd..9187141 100644 --- a/src/Components/Curtains/Curtains.tsx +++ b/src/Components/Curtains/Curtains.tsx @@ -175,9 +175,10 @@ export function CurtainsProvider({children}: React.PropsWithChildren<{}>) useEffect(() => { if ( Object.keys(curtains).filter((curtainId) => !closedCurtains[curtainId]).length > 0 - && !document.body.classList.contains("dimmed") ) // We should dim content if there is at least one open curtain. - document.body.classList.add("dimmed"); + { // Only dim if it's not already dimmed. + if (!document.body.classList.contains("dimmed")) document.body.classList.add("dimmed"); + } else // We shouldn't dim content. document.body.classList.remove("dimmed");