score:0

onClick={
(e)=>console.log(e.target.href)
setLocation(e.target.href)
}
const setLocation = (path) => {
    console.log(window.location.pathname);
    setCurrentLocation(window.location.pathname+path);
  };

score:1

<Link onClick={() => setLocation("/upcoming")} to="/upcoming" className="btn btn-primary btn-sm">

More Query from same tag