hey guys im working on setting userdata for the userprofile on our dapp. this is the code
this is the code. it briefly updates the user interface in regadr to username but then switches back to the original username. in the database its never being updated.
const handleSubmit = async (e) => {
e.preventDefault();
const username = document.getElementById("username").value;
const email = document.getElementById("email").value;
const socials = document.getElementById("socials").value;
await setUserData({
username,
email,
url: socials,
// file: avatar,
});
};
inputs are inside a form which triggers the "handleSubmit"function onSubmit.
the input fields have id & name value according to the .getElementById values… it worked yesterday for some time but now its buggin
Let me know if you have an idea what it could be… thx
ps. theres no errors thrown in console log. all dependencies are installed and imported correctly