const [_, getFormData] = usePostData(‘/builds’, {}, ‘post’);
const importButtonHandle = (e) => {
e.preventDefault();
const isValidate = validateForm(formValue);
if (!isValidate) {
const formData = new FormData();
formData.append("title", files[0]?.name);
formData.append("build", files);
formData.append("isLive", "true");
getFormData(formData).then(res => {
console.log(res);
if (res.success) {
} else {
}
})
.catch(err => {
if (err) {
console.log(err)
}
});
}
};