Visual fixes

This commit is contained in:
Richard Ramos 2018-12-05 09:39:18 -04:00
parent 4096aa1bfa
commit 7c2a0249ca
4 changed files with 7 additions and 7 deletions

View File

@ -28,8 +28,8 @@ class PollCreationCredits extends Component {
state = {
open: false,
tokenBalance: '0',
ethBalance: '0'
tokenBalance: '-',
ethBalance: '1'
};
handleClickOpen = () => {
@ -69,7 +69,7 @@ class PollCreationCredits extends Component {
render(){
let ethBalance = web3.utils.fromWei(this.state.ethBalance, "ether");
let tokenBalance = Math.floor(web3.utils.fromWei(this.state.tokenBalance, "ether"));
let tokenBalance = this.state.tokenBalance != "-" ? Math.floor(web3.utils.fromWei(this.state.tokenBalance, "ether")) : "-";
return <Fragment><div className="section">
<Typography variant="headline">Create a Poll</Typography>

View File

@ -120,7 +120,7 @@ class PollCreationResults extends Component {
</div>
}
{ !isPending && pollTransaction && <div className="confirmed">
<img src="../images/confirmed.svg" width="40" />
<img src="images/confirmed.svg" width="40" />
<Typography variant="headline">The poll was created and its now live!</Typography>
</div>}
{ pollTransactionHash && etherscanURL && <Typography variant="body1"><a target="_blank" href={ etherscanURL + pollTransactionHash}>View details on Etherscan</a></Typography> }

View File

@ -122,7 +122,7 @@ class PollOptions extends Component {
<div className="section pollCreation">
<Typography variant="headline">Create a Poll</Typography>
<Typography variant="body1" style={{marginTop: '20px'}}>Add options to the poll</Typography>
<a onClick={this.handleClickOpen} className="addOption"><img src="../images/plus-button.svg" width="40" />Add option</a>
<a onClick={this.handleClickOpen} className="addOption"><img src="images/plus-button.svg" width="40" />Add option</a>
<SortableList lockAxis={"y"} distance={10} items={this.state.options} editOption={this.editOption} removeOption={this.removeOption} onSortEnd={this.onSortEnd} />
</div>

View File

@ -75,7 +75,7 @@ class PollReview extends Component {
if(!poll.options) return null;
return <Fragment>
<LinearProgress variant="determinate" value={96} />
<LinearProgress variant={this.state.isSubmitting ? "indeterminate" : "determinate"} value={this.state.isSubmitting ? 100 : 96} />
<div className="section pollCreation">
<Typography variant="headline">Review details</Typography>
@ -101,7 +101,7 @@ class PollReview extends Component {
</div>
</div>
<div className="buttonNav">
<Button onClick={this.sign} disabled={this.isSubmitting}>Sign to confirm</Button>
<Button onClick={this.sign} disabled={this.state.isSubmitting}>Sign to confirm</Button>
</div>
</Fragment>;
}