import React, {useState} from 'react' import { Link } from 'react-router-dom' import RecentActivityTable from './WalletComponent/RecentActivityTable' import PurchasesTable from './WalletComponent/PurchasesTable' import CouponTable from './WalletComponent/CouponTable' import LoadingSpinner from '../Spinners/LoadingSpinner' import { PriceFormatter } from '../Helpers/PriceFormatter' function Balance({wallet, coupon}) { return (
{/* heading */}

Wallet

{/* WALLET SECTION */}
{/*

Wallet

*/} {/*

Add New Wallet

*/}
{/* wallet balance */} {wallet.loading ? : wallet.data.length ? wallet.data.map((item, index)=> (

{item.description}

{item.symbol}

Balance

{PriceFormatter(item.amount * 0.01, item.code)}

Escrow

{PriceFormatter(item.escrow * 0.01, item.code)}
{ item.action_type != 'AC_AD_FD_ONLY' ? Transfer:'' } Add Credit
)) : wallet.error ? (

Opps! An Error occurred, please try again

) : (

No Wallets Found!

) } {/* end of wallet balance */}
{/* END OF WALLET SECTION */}
{/*
*/} {/* /!* COUPON SECTION *!/*/} {/*
*/} {/*
*/} {/*

Coupons

*/} {/* {coupon.loading ?*/} {/* */} {/* :*/} {/* */} {/* }*/} {/*
*/} {/*
*/} {/* /!* END OF COUPON SECTION *!/*/} {/*
*/}
) } export default Balance