2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Link from 'component/link';
|
|
|
|
import { CreditAmount } from 'component/common';
|
2017-08-17 22:19:29 +02:00
|
|
|
|
|
|
|
const WalletBalance = props => {
|
|
|
|
const { balance, navigate } = props;
|
2017-08-20 23:42:00 +02:00
|
|
|
/*
|
|
|
|
<div className="help">
|
|
|
|
<Link
|
|
|
|
onClick={() => navigate("/backup")}
|
|
|
|
label={__("Backup Your Wallet")}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
*/
|
2017-08-17 22:19:29 +02:00
|
|
|
return (
|
|
|
|
<section className="card">
|
|
|
|
<div className="card__title-primary">
|
2017-12-21 22:08:54 +01:00
|
|
|
<h3>{__('Balance')}</h3>
|
2017-08-17 22:19:29 +02:00
|
|
|
</div>
|
|
|
|
<div className="card__content">
|
2017-12-21 22:08:54 +01:00
|
|
|
{(balance || balance === 0) && <CreditAmount amount={balance} precision={8} />}
|
2017-08-17 22:19:29 +02:00
|
|
|
</div>
|
2017-10-09 07:10:56 +02:00
|
|
|
<div className="card__actions">
|
2017-12-21 22:08:54 +01:00
|
|
|
<Link button="alt" navigate="/getcredits" label={__('Get Credits')} />
|
2017-08-26 05:21:26 +02:00
|
|
|
<Link
|
2017-12-07 19:07:30 +01:00
|
|
|
button="alt"
|
2017-08-26 05:21:26 +02:00
|
|
|
disabled={balance === 0}
|
2017-08-20 23:42:00 +02:00
|
|
|
navigate="/backup"
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Backup Wallet')}
|
2017-08-20 23:42:00 +02:00
|
|
|
/>
|
2017-08-17 22:19:29 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default WalletBalance;
|