Skip to content

Commit

Permalink
Format all components using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Mar 15, 2018
1 parent 4f9c462 commit bbc7833
Show file tree
Hide file tree
Showing 130 changed files with 14,305 additions and 6,761 deletions.
905 changes: 699 additions & 206 deletions app/components/Account/AccountAssetCreate.jsx

Large diffs are not rendered by default.

257 changes: 172 additions & 85 deletions app/components/Account/AccountAssetUpdate.jsx

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions app/components/Account/AccountBalance.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,35 @@ import BalanceComponent from "../Utility/BalanceComponent";
*/

class AccountBalance extends React.Component {

static propTypes = {
account: ChainTypes.ChainAccount.isRequired,
asset: ChainTypes.ChainAsset.isRequired
}
};

static defaultProps = {
autosubscribe: false
}
};

render() {
let asset_id = this.props.asset.get("id");
let balance_id = this.props.account.getIn( ["balances", asset_id] );
let balance_id = this.props.account.getIn(["balances", asset_id]);

if( balance_id ) return <BalanceComponent balance={balance_id} replace={this.props.replace} />;
else return <span>0&nbsp;<AssetName name={this.props.asset.get("symbol")} replace={this.props.replace} /></span>;
if (balance_id)
return (
<BalanceComponent
balance={balance_id}
replace={this.props.replace}
/>
);
else
return (
<span>
0&nbsp;<AssetName
name={this.props.asset.get("symbol")}
replace={this.props.replace}
/>
</span>
);
}
}

Expand Down
404 changes: 279 additions & 125 deletions app/components/Account/AccountDepositWithdraw.jsx

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions app/components/Account/AccountImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ class AccountImage extends Component {
render() {
let {account, image, style} = this.props;
let {height, width} = this.props.size;
let custom_image = image ?
<img src={image} height={height + "px"} width={width + "px"}/> :
<Identicon id={account} account={account} size={this.props.size}/>;
let custom_image = image ? (
<img src={image} height={height + "px"} width={width + "px"} />
) : (
<Identicon id={account} account={account} size={this.props.size} />
);

return (
<div style={style} className="account-image">
Expand Down
56 changes: 42 additions & 14 deletions app/components/Account/AccountInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ import Translate from "react-translate-component";
import QRCode from "qrcode.react";

class AccountInfo extends React.Component {

static propTypes = {
account: ChainTypes.ChainAccount.isRequired,
title: React.PropTypes.string,
image_size: React.PropTypes.object.isRequired,
my_account: React.PropTypes.bool
}
};

static defaultProps = {
title: null,
image_size: {height: 120, width: 120},
showQR: false,
titleClass: "account-title"
}
};

constructor() {
super();
Expand All @@ -32,30 +31,59 @@ class AccountInfo extends React.Component {
render() {
let {account, image_size} = this.props;

let isLTM = account.get("lifetime_referrer_name") === account.get("name");
let isLTM =
account.get("lifetime_referrer_name") === account.get("name");

let QR = <div className="account-image"><QRCode size={image_size.width} value={account.get("name")}/></div>;
let QR = (
<div className="account-image">
<QRCode size={image_size.width} value={account.get("name")} />
</div>
);

let qrState = !this.state.hover ? this.props.showQR : !this.props.showQR;
let qrState = !this.state.hover
? this.props.showQR
: !this.props.showQR;

return (
<div style={{maxWidth: image_size.width}} className={"account-info" + (this.props.my_account ? " my-account" : "")}>
<div
style={{maxWidth: image_size.width}}
className={
"account-info" +
(this.props.my_account ? " my-account" : "")
}
>
{this.props.title ? <h4>{this.props.title}</h4> : null}
<div
onMouseEnter={() => {this.setState({hover: true});}}
onMouseLeave={() => {this.setState({hover: false});}}
onMouseEnter={() => {
this.setState({hover: true});
}}
onMouseLeave={() => {
this.setState({hover: false});
}}
className="clickable"
onClick={() => {
this.setState({hover: false});
this.props.toggleQR(!this.props.showQR);
}}
>
{qrState ?
QR :
<AccountImage size={image_size} account={account.get("name")} custom_image={null}/>}
{qrState ? (
QR
) : (
<AccountImage
size={image_size}
account={account.get("name")}
custom_image={null}
/>
)}
</div>
<p><Translate content="account.deposit_address" />!</p>
<p className={this.props.titleClass}><span className={isLTM ? "lifetime" : ""}>{account.get("name")}</span></p>
<p>
<Translate content="account.deposit_address" />!
</p>
<p className={this.props.titleClass}>
<span className={isLTM ? "lifetime" : ""}>
{account.get("name")}
</span>
</p>
{/* <div className="secondary">
<span className="subheader">#{display_id}</span>
{this.props.my_account ? <span className="my-account-label"><Translate content="account.mine" /></span> : null}
Expand Down
Loading

0 comments on commit bbc7833

Please sign in to comment.