-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Withdraw form #29
Conversation
Thanks @mghazanfar89 |
Similar issues as https://github.com/hubiinetwork/omphalos-ui/pull/31 |
return ( | ||
<Wrapper> | ||
<Flex> | ||
<FlexForm onSubmit={this.handleSubmit}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a single form for all the inputs and dropdowns of component rather than multiple forms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** | ||
* gas price in dollar for the component . | ||
*/ | ||
gasDollar: PropTypes.number.isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove unused proptypes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
title="Available Balance" | ||
info | ||
balance={availableBalance} | ||
showCoinName={availableBalanceCoin} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think balanceCoin and availableBalanceCoin will be same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the same but I guess that there may exist some scenario where both are different. Hence keeping both of the props.
/** | ||
* heading of the component . | ||
*/ | ||
heading: PropTypes.string.isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eradicated!
}); | ||
} | ||
|
||
handleAccount(value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use es6 functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding this, it's a good suggestion, I used to think ES6 classes should be used too. However FB recommends they are defined as methods, see facebook/react#9851
Please let's follow this convention where we can, thanks guys!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Thanks
constructor(props) { | ||
super(props); | ||
this.state = { | ||
amount: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be from props e.g amount:props.amount || 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added props.
No description provided.