How to fix Cannot use useParams() for a route that does not contain URL parameters in React | DevErrors