mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-23 15:48:10 +00:00
Visual fixes
This commit is contained in:
parent
4096aa1bfa
commit
7c2a0249ca
@ -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>
|
||||
|
@ -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 it’s now live!</Typography>
|
||||
</div>}
|
||||
{ pollTransactionHash && etherscanURL && <Typography variant="body1"><a target="_blank" href={ etherscanURL + pollTransactionHash}>View details on Etherscan</a></Typography> }
|
||||
|
@ -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>
|
||||
|
@ -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>;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user