diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx index 78d8e34..72671e7 100644 --- a/src/components/FamilyAcc/FamilyTable.jsx +++ b/src/components/FamilyAcc/FamilyTable.jsx @@ -25,7 +25,7 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle return (
Add New Wallet
*/} diff --git a/src/components/MyWallet/Wallet.jsx b/src/components/MyWallet/Wallet.jsx index 7237fd9..23cf8fe 100644 --- a/src/components/MyWallet/Wallet.jsx +++ b/src/components/MyWallet/Wallet.jsx @@ -20,9 +20,6 @@ function Wallet() { } - - - const WalletRoutes = () => { const apiCall = new usersService() @@ -38,18 +35,6 @@ const WalletRoutes = () => { error: false }) - let [purchaseHistory, setPurchaseHistory] = useState({ // FOR PURCHASE HISTORY - loading: true, - data: [], - error: false - }) - - let [couponHistory, setCouponHistory] = useState({ // FOR COUPON HISTORY - loading: true, - data: [], - error: false - }) - //FUNCTION TO GET WALLET LIST const getWalletList = ()=>{ apiCall.getUserWallets(null).then((res)=>{ @@ -76,38 +61,9 @@ const WalletRoutes = () => { }) } - //FUNCTION TO GET PURCHASE HISTORY - const getPurchaseHistory = ()=>{ - apiCall.getPurchaseHx().then((res)=>{ - if(res.data.internal_return < 0){ // success but no data - setPurchaseHistory(prev => ({...prev, loading: false})) - return - } - // console.log('purchase',res.data) - setPurchaseHistory(prev => ({...prev, loading: false, data: res.data.result_list})) - }).catch((error)=>{ - setPurchaseHistory(prev => ({...prev, loading: false, error: true})) - }) - } - - //FUNCTION TO GET COUPON HISTORY - const getCouponHistory = ()=>{ - apiCall.getCouponHx().then((res)=>{ - if(res.data.internal_return < 0){ // success but no data - setCouponHistory(prev => ({...prev, loading: false})) - return - } - setCouponHistory(prev => ({...prev, loading: false, data: res.data.result_list})) - }).catch((error)=>{ - setCouponHistory(prev => ({...prev, loading: false, error: true})) - }) - } - useEffect(()=>{ getWalletList() getPaymentHistory() - getPurchaseHistory() - getCouponHistory() }, []) return (