In react, how to prevent page requests from being triggered repeatedly when the jump path is the same when clicked?

how to prevent users from clicking multiple clicks when clicking the same navigation?

Mar.29,2021

just compare the navigation url with the current url.

onClick={() => {
    if(menu.url === location.herf)
        return;
}}
Menu