pop up err

This commit is contained in:
unknown
2025-04-15 01:43:54 +07:00
parent 73a4ebf5da
commit 05253df9cf

View File

@ -160,15 +160,16 @@ const Kyc = () => {
if (updateData.isneedapproval == 1&&destinationGroup === "Premium") await axios.post(`${BASE_URL}/customer/approve`, { customerid: customerId, description: updateData.approval_description_premium}); if (updateData.isneedapproval == 1&&destinationGroup === "Premium") await axios.post(`${BASE_URL}/customer/approve`, { customerid: customerId, description: updateData.approval_description_premium});
if (updateData.isneedapproval == 1&&destinationGroup === "Agent") await axios.post(`${BASE_URL}/customer/approve`, { customerid: customerId, description: updateData.approval_description_agent}); if (updateData.isneedapproval == 1&&destinationGroup === "Agent") await axios.post(`${BASE_URL}/customer/approve`, { customerid: customerId, description: updateData.approval_description_agent});
} }
await fetchCustomers();
setDialogOpen(false); setDialogOpen(false);
setIsDialogOpen(false); setIsDialogOpen(false);
toast.success(`Success Update & ${dialogType} Kyc Member`); toast.success(`Success Update & ${dialogType} Kyc Member`);
} catch (error: any) { } catch (error: any) {
if (error?.response?.data?.error) error.message = error?.response?.data?.error
setDialogOpen(false); setDialogOpen(false);
setIsDialogOpen(false); setIsDialogOpen(false);
toast.error(error.message); toast.error(error.message);
} finally { } finally {
await fetchCustomers();
setLoading(false) setLoading(false)
} }
}; };