Fix votes start entry from 0

This commit is contained in:
Onuwa Nnachi Isaac 2019-06-29 10:23:20 +01:00
parent 4a00bf85bf
commit fce799caa2
No known key found for this signature in database
GPG Key ID: 831A4177E1A2CEBB
2 changed files with 9 additions and 0 deletions

View File

@ -141,6 +141,7 @@ class Vote extends Component {
{currentSNTamount.toLocaleString()}
</span>
{isUpvote &&
sntValue > 0 &&
afterVoteRating !== null &&
afterVoteRating > 0 && (
<span className={styles.greenBadge}>
@ -148,6 +149,7 @@ class Vote extends Component {
</span>
)}
{!isUpvote &&
sntValue > 0 &&
afterVoteRating !== null &&
afterVoteRating > 0 && (
<span className={styles.redBadge}>
@ -166,6 +168,7 @@ class Vote extends Component {
{`${getCategoryName(dapp.category)}${catPosition}`}
</span>
{isUpvote &&
sntValue > 0 &&
afterVoteCategoryPosition !== null &&
afterVoteCategoryPosition !== catPosition && (
<span className={styles.greenBadge}>
@ -173,6 +176,7 @@ class Vote extends Component {
</span>
)}
{!isUpvote &&
sntValue > 0 &&
afterVoteCategoryPosition !== null &&
afterVoteCategoryPosition !== catPosition && (
<span className={styles.redBadge}>
@ -197,6 +201,7 @@ class Vote extends Component {
type="text"
value={sntValue}
onChange={this.handleChange}
placeholder="0"
style={{ width: `${21 * Math.max(1, sntValue.length)}px` }}
/>
</div>

View File

@ -175,6 +175,10 @@
margin-right: calculateRem(6);
}
input::placeholder {
color: $headline-color;
}
.inputArea input:focus {
outline: none;
}