I am currently facing an issue with displaying and hiding a navbar based on the value of a variable. While I have managed to successfully toggle the Navbar's visibility, my problem arises when attempting to keep the Navbar constantly visible at the large breakpoint irrespective of the variable setting.
To clarify, I intend for the navbar to remain displayed at the large breakpoint and beyond even if the variable controlling its visibility is set to false. Unfortunately, this functionality does not seem to be working as intended. I am struggling to identify what could be going wrong in my code. Any assistance would be greatly appreciated.
Below is the snippet of my code:
<div className={`lg:!relative z-50 ${showNavBar ? "absolute" : "hidden"} `}>
<Navbar showNavBar={showNavBar} handleNavBar={handleNavBar} />
</div>