Skip to content

Commit

Permalink
Merge pull request #3891 from LiskHQ/3627-delegate-performance-metrics
Browse files Browse the repository at this point in the history
Delegate profile performance metrics are not showing correctly - Closes #3627
  • Loading branch information
reyraa authored Oct 26, 2021
2 parents 48eae0c + 8e28554 commit 88d2632
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
"Label is too long, Max. 20 characters": "Label is too long, Max. 20 characters",
"Label is too long.": "Label is too long.",
"Last block forged": "Last block forged",
"Last forged block": "Last forged block",
"Last {{num}} blocks": "Last {{num}} blocks",
"Later": "Later",
"Latest votes": "Latest votes",
Expand Down Expand Up @@ -358,7 +359,6 @@
"Priority": "Priority",
"Privacy": "Privacy",
"Privacy policy": "Privacy policy",
"Productivity": "Productivity",
"Provide Feedback": "Provide Feedback",
"Provide a correct amount of {{token}}": "Provide a correct amount of {{token}}",
"Provide a correct wallet address or the name of a bookmarked account": "Provide a correct wallet address or the name of a bookmarked account",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
& .content {
flex-flow: row nowrap;
margin-left: 0;

& a {
text-decoration: none;
}
}
}

Expand Down
15 changes: 12 additions & 3 deletions src/components/screens/wallet/delegateProfile/performanceView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { NavLink } from 'react-router-dom';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import { DEFAULT_STANDBY_THRESHOLD } from '@constants';

import { DEFAULT_STANDBY_THRESHOLD, routes } from '@constants';
import { useTheme } from '@utils/theme';
import { capitalize } from '@utils/helpers';
import Box from '@toolbox/box';
Expand Down Expand Up @@ -156,10 +158,17 @@ const PerformanceView = ({
</Box>
<Box className={`${grid.col} ${grid['col-xs-4']} ${grid['col-md-4']} ${styles.column}`}>
<Item
title={t('Productivity')}
title={t('Last forged block')}
icon="productivity"
>
<div className={styles.performanceValue}>{'99.45%' || '-'}</div>
<NavLink
to={`${routes.block.path}?height=${data.lastForgedHeight}`}
className={styles.performanceValue}
id={data.lastForgedHeight}
exact
>
{data.lastForgedHeight || '-'}
</NavLink>
</Item>
<Item
title={t('Forged blocks')}
Expand Down

0 comments on commit 88d2632

Please sign in to comment.