Skip to content

Commit

Permalink
feat(webapp): show when non-compliant BP provides an invalid url
Browse files Browse the repository at this point in the history
  • Loading branch information
Torresmorah committed Jan 20, 2023
1 parent a2a2d05 commit 966b66a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
20 changes: 12 additions & 8 deletions webapp/src/components/NonCompliantCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,23 @@ const NonCompliantCard = ({ producer, stats }) => {
return (
<>
<div className={`${classes.content} ${classes.account}`}>
<Typography variant="h3" component="span">{producer.owner}</Typography>
<Typography variant="h3" component="span">
{producer.owner}
</Typography>
<Typography variant="body1">{t('noInfo')}</Typography>
</div>
<div className={`${classes.content} ${classes.borderLine}`}>
<Typography variant="overline">{t('info')}</Typography>
{isUrlValid(producer.url) && (
<div className={classes.flex}>
<Typography variant="body1" className={classes.bold}>
{t('website')}:
</Typography>
<div className={classes.flex}>
<Typography variant="body1" className={classes.bold}>
{t('website')}:
</Typography>
{isUrlValid(producer.url) ? (
<VisitSite title={t('openLink')} url={producer.url} />
</div>
)}
) : (
<Typography variant="body1">{t('invalidUrl')}</Typography>
)}
</div>
<RowInfo
title={`${t('votes')}`}
value={`${formatWithThousandSeparator(producer.total_votes_eos, 0)}`}
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@
"ratings": "ratings",
"lastClaimTime": "Last Claimed Time",
"noInfo": "No info provided",
"dailyRewards": "Daily Rewards"
"dailyRewards": "Daily Rewards",
"invalidUrl": "Invalid URL"
},
"nodeCardComponent": {
"features": "Features",
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@
"ratings": "calificaciones",
"lastClaimTime": "Último reclamo",
"noInfo": "No provee información",
"dailyRewards": "Recompensas diarias"
"dailyRewards": "Recompensas diarias",
"invalidUrl": "URL inválida"
},
"nodeCardComponent": {
"features": "Características",
Expand Down

0 comments on commit 966b66a

Please sign in to comment.