enter code hereenter image description here enter code here
const [allData, setAllData] = useState({})
const [userData, setUserData] = useState({
no: "",
url: "",
supporturl: "",
support: "",
whatsapp: "",
});
const { no } = userData;
setAllData({ ...allData, no: no })
const res = fetch("https://j-kik-3f4e1-default-rtdb.firebaseio.com/userDataRecords.json",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
allData
})
}
)
if (res) {
setUserData({
// no:"",
})
alert('Number Saved successfully')
} else {
alert('Number Saved error')
}
}?