Skip to content

Commit

Permalink
Merge pull request #1368 from edenia/feat/improve-message-and-fix-eos…
Browse files Browse the repository at this point in the history
…-rate-link

Feat/improve message and fix eos rate link
  • Loading branch information
xavier506 authored Oct 26, 2023
2 parents d03faa0 + 47198b7 commit 1054f47
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
14 changes: 10 additions & 4 deletions webapp/src/components/NoResults/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React from 'react'
import { makeStyles } from '@mui/styles'
import { useTranslation } from 'react-i18next'
import Card from '@mui/material/Card'
Expand All @@ -8,15 +8,21 @@ import styles from './styles'

const useStyles = makeStyles(styles)

const NoResults = () => {
const NoResults = ({ translationScope }) => {
const classes = useStyles()
const { t } = useTranslation('noResultsComponent')
const { t } = useTranslation(translationScope)

return (
<Card className={classes.root}>
<Typography variant="h4" component="p">{t('noResultsFound')}</Typography>
<Typography variant="h4" component="p">
{t('noResultsFound')}
</Typography>
</Card>
)
}

NoResults.defaultProps = {
translationScope: 'noResultsComponent',
}

export default NoResults
3 changes: 3 additions & 0 deletions webapp/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@
"executeTransaction": "Execute Transaction",
"owner": "Owner"
},
"undiscoverableBPsRoute": {
"noResultsFound": "Well Done! All Block Producers are Operating Transparently."
},
"blockDistributionRoute": {
"title": "Blocks generated by producer",
"blocksProduced": "Blocks Produced",
Expand Down
3 changes: 3 additions & 0 deletions webapp/src/language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@
"scheduledBlocks": "Bloques progamados",
"availability": "Disponibilidad"
},
"undiscoverableBPsRoute": {
"noResultsFound": "Bien Hecho! Todos los Productores de Bloques están Operando de Manera Transparente."
},
"endpointsListRoute": {
"title": "Endpoints disponibles por",
"updatedAt": "Actualizado por última vez",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/NonCompliantBPs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const NonCompliantBPs = () => {
</div>
</>
) : (
<NoResults />
<NoResults translationScope={'undiscoverableBPsRoute'}/>
)}
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/ProducerProfile/GeneralInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const GeneralInformation = ({ producer }) => {
)})`}
<VisitSite
title={t('openLink')}
url={`${generalConfig.eosRateLink}block-producers/${producer?.eosRate.bp}`}
url={`${generalConfig.eosRateLink}/block-producers/${producer?.eosRate.bp}`}
/>
</Typography>
</span>
Expand Down

0 comments on commit 1054f47

Please sign in to comment.