const passFromPicToUpload = (e) =>{
        hiddenFileInput.current.click();
        console.log("one")
    }
const handleProfilePicUpload = (e) =>{
    console.log("two")
    if(e.target.files[0]){
        setImage(e.target.files[0]);
        
    }
}
 return (
     <div className="profile">
      <div className="imageContainer" >
       <a href="#" onClick={passFromPicToUpload}>
        {
          profile.avatarUrl?<Image src={profile.avatarUrl} className="profile__image"  /> :<Image src="https://i.stack.imgur.com/l60Hf.png" className="profile__image" /> 
        }
       </a>
      </div>   
     <input type="file" ref={hiddenFileInput} onChange={handleProfilePicUpload} style={{display:'none'}} /> 
 </div>
)
So basically the file choosing window is showing but after I choose a pic the "handleProfilePicUpload" is not firing.
 
     
     
    