Very simple, to pass event details from a onclick button:

example:

              <MDButton variant="gradient" color="success" fullWidth disabaled="false"
              onClick={(e)=>searchSecurityCode(e)}>
                Get Files
              </MDButton>

 

  const searchSecurityCode = (ev) => {
  alert('you clicked');
    console.log(`LINE 73 ev=`, ev);
    //ev.preventDefault();
   navigate('/upload');

  };