fix submit setup

This commit is contained in:
2026-01-26 09:45:26 +07:00
parent 739b00e07a
commit 876c4f9d49

View File

@@ -35,15 +35,17 @@ function handleSubmit(e: React.FormEvent) {
e.preventDefault();
const merchant = getMerchant();
if (!merchant || !form) return;
if (!isFormValid) return;
if(merchant){
const isDifferent = isObjectValueDifferent(merchant, form);
if (isDifferent) {
clearDevice(); // reset device kalau merchant berubah
}
}
setLoading(true);
saveMerchant(form);