Javascript Conditional Statement Not Working In Useeffect Stack

Javascript Conditional Statement Not Working In Useeffect Stack