This commit was merged in pull request #338.
This commit is contained in:
2023-07-18 20:28:30 +01:00
parent 1ffb732bfa
commit d4cf7419bf
+11 -3
View File
@@ -32,7 +32,13 @@ const WalletRoutes = () => {
if (res.data.internal_return < 0) { if (res.data.internal_return < 0) {
setWalletList({ loading: false, data: [] }); setWalletList({ loading: false, data: [] });
} else { } else {
setWalletList({ loading: false, data: res.data?.result_list }); setWalletList({ loading: true, data: [] });
setTimeout(
() =>
setWalletList({ loading: false, data: res.data?.result_list }),
500
);
} }
}) })
.catch(() => { .catch(() => {
@@ -60,8 +66,10 @@ const WalletRoutes = () => {
await Promise.all([getWalletList(), getPaymentHistory()]); await Promise.all([getWalletList(), getPaymentHistory()]);
}; };
fetchData(); if (walletList.loading) {
}, [walletTable, walletList.data]); fetchData();
}
}, [walletTable, walletList.loading]);
console.log(walletTable); console.log(walletTable);
return ( return (