Should i use states and bool variable to light mode?

So im trying to do a light/dark mode in my app but when trying to change my hover with a condition using a boolean variable to confirm lightmode, it shows me that the value is going to be the one i want but it doesnt work


for some reason it worked when i deleted the state hover and put it again, since i had the hover state before creating the “light mode” it wasnt working, so redoing the state fixed the bug.