mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-24 08:08:19 +00:00
Link to connect page, #18
This commit is contained in:
parent
063dc2539e
commit
e19355488c
@ -45,6 +45,10 @@ class VotingCredits extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
redirectToConnect = () => {
|
||||||
|
this.props.history.push('/wallet/' + this.props.idPoll);
|
||||||
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
const {polls, balances, idPoll} = this.props;
|
const {polls, balances, idPoll} = this.props;
|
||||||
|
|
||||||
@ -64,22 +68,22 @@ class VotingCredits extends Component {
|
|||||||
return (polls ? <Fragment><div className="section">
|
return (polls ? <Fragment><div className="section">
|
||||||
<Typography variant="headline">{title}</Typography>
|
<Typography variant="headline">{title}</Typography>
|
||||||
<Typography variant="body1" component="div" dangerouslySetInnerHTML={{__html: description}}></Typography>
|
<Typography variant="body1" component="div" dangerouslySetInnerHTML={{__html: description}}></Typography>
|
||||||
<Card className="card credits">
|
<Card className="card credits" onClick={this.redirectToConnect}>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography component="div">
|
<Typography component="div" onClick={this.redirectToConnect}>
|
||||||
<span className="title">Voting Credits</span>
|
<span className="title">Voting Credits</span>
|
||||||
<span className="value">{tokenBalance}</span>
|
<span className="value">{tokenBalance}</span>
|
||||||
</Typography>
|
</Typography>
|
||||||
{ tokenBalance > 0 &&
|
{ tokenBalance > 0 &&
|
||||||
<Typography component="p" className="text">
|
<Typography component="p" className="text" onClick={this.redirectToConnect}>
|
||||||
You get one credit for each SNT held in your wallet <b>at the time of poll was created ({d.DDMMYYYY()})</b>. They are usable only in this poll.
|
You get one credit for each SNT held in your wallet <b>at the time of poll was created ({d.DDMMYYYY()})</b>. They are usable only in this poll.
|
||||||
</Typography> }
|
</Typography> }
|
||||||
{ tokenBalance == 0 &&
|
{ tokenBalance == 0 &&
|
||||||
<div className="warning">
|
<div className="warning">
|
||||||
<Typography component="h2" >
|
<Typography component="h2" onClick={this.redirectToConnect}>
|
||||||
No SNT in your wallet
|
No SNT in your wallet
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography component="p">
|
<Typography component="p" onClick={this.redirectToConnect}>
|
||||||
To vote, you need to connect with a wallet that holds SNT tokens <b>when the poll was created ({d.DDMMYYYY()})</b>.
|
To vote, you need to connect with a wallet that holds SNT tokens <b>when the poll was created ({d.DDMMYYYY()})</b>.
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@ -88,15 +92,15 @@ class VotingCredits extends Component {
|
|||||||
</Card>
|
</Card>
|
||||||
{ ethBalance == 0 && <Card className="card credits">
|
{ ethBalance == 0 && <Card className="card credits">
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography component="div">
|
<Typography component="div" onClick={this.redirectToConnect}>
|
||||||
<span className="title">ETH</span>
|
<span className="title">ETH</span>
|
||||||
<span className="value">{ethBalance}</span>
|
<span className="value">{ethBalance}</span>
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className="warning">
|
<div className="warning">
|
||||||
<Typography component="h2">
|
<Typography component="h2" onClick={this.redirectToConnect}>
|
||||||
Not enough ETH in your wallet
|
Not enough ETH in your wallet
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography component="p">
|
<Typography component="p" onClick={this.redirectToConnect}>
|
||||||
You will sign a transaction to confirm your vote. No tokens are sent, but you need ETH to pay for gas (Ethereum network fee).
|
You will sign a transaction to confirm your vote. No tokens are sent, but you need ETH to pay for gas (Ethereum network fee).
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user