diff --git a/src/pages/members/manage-members/CustomerDetailModal.tsx b/src/pages/members/manage-members/CustomerDetailModal.tsx index dcb4534..152e749 100644 --- a/src/pages/members/manage-members/CustomerDetailModal.tsx +++ b/src/pages/members/manage-members/CustomerDetailModal.tsx @@ -440,8 +440,10 @@ function getAdmAccess(page: string, data: any, handleClose: any, fetchCustomers: await fetchCustomers() toast.success('Success Change group') } catch (error: any) { + console.log(error); toast.error(error.message) } finally { + await fetchCustomers() setChangeGroupD(false) handleClose() } @@ -548,7 +550,6 @@ function getPinStatus(status: string) { } // CUSTOMER WALLET function showCustomerWallet(customerid: any) { - const [dialogOpen, setDialogOpen] = useState(false); const [customerWallet, setCustomerWallet] = useState([]); if (!customerid) return '' @@ -565,14 +566,12 @@ function showCustomerWallet(customerid: any) { } } - const handleYes = async () => {} - return ( Wallet Member - {customerWallet.map((item:any, index:any) => ( + {customerWallet.length ? (customerWallet.map((item:any, index:any) => ( {index < customerWallet.length - 1 && } - ))} + ))): "No wallet"} - setDialogOpen(false)} - title="Confirm Action" - content={`Are you sure you want to show?`} - onYes={handleYes} - onNo={() => setDialogOpen(false)} - /> ) } \ No newline at end of file