How to fix Error: useNavigate() may be used only in the context of a <Router> component. in React | DevErrors