Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Wallet/Wallet.js
import React from 'react'; | import React from 'react'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import { LinkOutlined, LoadingOutlined } from '@ant-design/icons'; | import { LinkOutlined, LoadingOutlined } from '@ant-design/icons'; | ||||
import { WalletContext } from '@utils/context'; | import { WalletContext } from '@utils/context'; | ||||
import { OnBoarding } from '@components/OnBoarding/OnBoarding'; | import { OnBoarding } from '@components/OnBoarding/OnBoarding'; | ||||
import { QRCode } from '@components/Common/QRCode'; | import { QRCode } from '@components/Common/QRCode'; | ||||
import { currency } from '@components/Common/Ticker.js'; | import { currency } from '@components/Common/Ticker.js'; | ||||
import { Link } from 'react-router-dom'; | import { Link } from 'react-router-dom'; | ||||
import TokenList from './TokenList'; | import TokenList from './TokenList'; | ||||
import { CashLoader } from '@components/Common/CustomIcons'; | import { CashLoader } from '@components/Common/CustomIcons'; | ||||
import { formatBalance } from '@utils/cashMethods'; | |||||
export const LoadingCtn = styled.div` | export const LoadingCtn = styled.div` | ||||
width: 100%; | width: 100%; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
height: 400px; | height: 400px; | ||||
flex-direction: column; | flex-direction: column; | ||||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | return ( | ||||
{currency.ticker} payments, or load it up with{' '} | {currency.ticker} payments, or load it up with{' '} | ||||
{currency.ticker} to send to others | {currency.ticker} to send to others | ||||
</ZeroBalanceHeader> | </ZeroBalanceHeader> | ||||
<BalanceHeader>0 {currency.ticker}</BalanceHeader> | <BalanceHeader>0 {currency.ticker}</BalanceHeader> | ||||
</> | </> | ||||
) : ( | ) : ( | ||||
<> | <> | ||||
<BalanceHeader> | <BalanceHeader> | ||||
{balances.totalBalance} {currency.ticker} | {formatBalance(balances.totalBalance)} {currency.ticker} | ||||
</BalanceHeader> | </BalanceHeader> | ||||
{fiatPrice !== null && !isNaN(balances.totalBalance) && ( | {fiatPrice !== null && !isNaN(balances.totalBalance) && ( | ||||
<BalanceHeaderFiat> | <BalanceHeaderFiat> | ||||
${(balances.totalBalance * fiatPrice).toFixed(2)}{' '} | ${(balances.totalBalance * fiatPrice).toFixed(2)}{' '} | ||||
USD | USD | ||||
</BalanceHeaderFiat> | </BalanceHeaderFiat> | ||||
)} | )} | ||||
</> | </> | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |