diff --git a/src/v2/components/TourDeSol/Cards/index.jsx b/src/v2/components/TourDeSol/Cards/index.jsx
index 72461d6f..cbd16065 100644
--- a/src/v2/components/TourDeSol/Cards/index.jsx
+++ b/src/v2/components/TourDeSol/Cards/index.jsx
@@ -70,7 +70,7 @@ const Cards = () => {
title: string,
value: string | (() => React$Node),
changes?: string,
- }) => ;
+ }) => ;
return
{map(renderStats)(cards)}
;
};
diff --git a/src/v2/components/TourDeSol/Cards/styles.js b/src/v2/components/TourDeSol/Cards/styles.js
index 3b85acad..21e3460c 100644
--- a/src/v2/components/TourDeSol/Cards/styles.js
+++ b/src/v2/components/TourDeSol/Cards/styles.js
@@ -1,9 +1,9 @@
import {makeStyles} from '@material-ui/core';
-export default makeStyles(() => ({
+export default makeStyles({
cards: {
'& div:not(:last-child)': {
marginBottom: 20,
},
},
-}));
+});
diff --git a/src/v2/components/TourDeSol/Ranking/index.jsx b/src/v2/components/TourDeSol/Ranking/index.jsx
index 64db870f..53425ca2 100644
--- a/src/v2/components/TourDeSol/Ranking/index.jsx
+++ b/src/v2/components/TourDeSol/Ranking/index.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import {observer} from 'mobx-react-lite';
-import {map} from 'lodash/fp';
+import {get, map, maxBy, compose} from 'lodash/fp';
import HelpLink from 'v2/components/HelpLink';
import NodesStore from 'v2/stores/nodes';
import {ReactComponent as BicycleIcon} from 'v2/assets/icons/bicycle.svg';
@@ -10,19 +10,30 @@ import useStyles from './styles';
const Ranking = () => {
const classes = useStyles();
const {
- cluster: {nodes},
+ cluster: {voting},
} = NodesStore;
- const renderNode = node => (
-
- {node.pubkey}
-
-
-
+ const maxVal = compose(
+ get('stake'),
+ maxBy('stake'),
+ )(voting);
+
+ const renderNode = node => {
+ const position = (node.stake * 100) / maxVal;
+ return (
+
+ {node.nodePubkey}
+
-
-
- );
+
+ );
+ };
return (
@@ -30,11 +41,9 @@ const Ranking = () => {
Top Validator Ranking
-
+
{map(renderNode)(voting)}
);
};
-Ranking.propTypes = {};
-
export default observer(Ranking);
diff --git a/src/v2/components/TourDeSol/Ranking/styles.js b/src/v2/components/TourDeSol/Ranking/styles.js
index bbdace86..8144a6c0 100644
--- a/src/v2/components/TourDeSol/Ranking/styles.js
+++ b/src/v2/components/TourDeSol/Ranking/styles.js
@@ -46,5 +46,6 @@ export default makeStyles(theme => ({
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
+ transition: 'left .15s ease-in-out',
},
}));