is there a possibility to hide a react component when an element in navigation menu is clicked? I used React router to navigate to the corresponding components. I have a Nav