token n legacy
This commit is contained in:
@ -108,6 +108,7 @@ const AgentBalance = () => {
|
||||
const handleReload = async () => {
|
||||
setIsReloading(true);
|
||||
await fetchAgentBalance(currentPage, pageSize, '','');
|
||||
closeDialog()
|
||||
setIsReloading(false);
|
||||
// fetchAgentBalance();
|
||||
};
|
||||
@ -192,6 +193,7 @@ const AgentBalance = () => {
|
||||
setToken_legacy={setToken_legacy}
|
||||
customerId={formData.id}
|
||||
agent_name={formData.agent_name}
|
||||
handleReload={handleReload}
|
||||
/>
|
||||
</div>
|
||||
</DialogContent>
|
||||
@ -202,7 +204,7 @@ const AgentBalance = () => {
|
||||
};
|
||||
|
||||
// ====================
|
||||
const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_legacy }: any) => {
|
||||
const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_legacy, handleReload }: any) => {
|
||||
const cardRef: any = useRef(null);
|
||||
|
||||
const waitForImageLoad = (img: HTMLImageElement): Promise<void> => {
|
||||
@ -248,6 +250,7 @@ const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_l
|
||||
token_legacy
|
||||
});
|
||||
toast.success(`Success Update Token Legacy`);
|
||||
await handleReload();
|
||||
} catch (error: any) {
|
||||
let err_msg = error?.response?.data?.error || error.message
|
||||
toast.error(err_msg);
|
||||
|
||||
Reference in New Issue
Block a user