-
+
Discuss on forums
diff --git a/src/v2/components/NavBar/index.jsx b/src/v2/components/NavBar/index.jsx
index 8a35c79b..d17958f7 100644
--- a/src/v2/components/NavBar/index.jsx
+++ b/src/v2/components/NavBar/index.jsx
@@ -14,6 +14,7 @@ import CloseIcon from '@material-ui/icons/Close';
import {RouterHistory, withRouter} from 'react-router-dom';
import React from 'react';
import {map, propEq, eq} from 'lodash/fp';
+import Mixpanel from 'v2/mixpanel';
import {ReactComponent as dashboard} from './assets/dashboard.svg';
import {ReactComponent as transactions} from './assets/transactions.svg';
@@ -34,6 +35,16 @@ const icons = {
favorites,
};
+const navTracks = {
+ dashboard: 'Clicked Overview',
+ transactions: 'Clicked Transactions Page',
+ validators: 'Clicked Transactions Page',
+ 'tour-de-sol': 'Clicked Transactions Page',
+ applications: 'Clicked Applications page',
+ blocks: 'Clicked Applications page',
+ favorites: 'Clicked Applications page',
+};
+
const NavBar = ({
location,
history,
@@ -64,6 +75,7 @@ const NavBar = ({
location.pathname.includes(link) ||
(propEq('pathname', '/rc/')(location) && isDashboard);
const changeRoute = () => {
+ Mixpanel.track(navTracks[link]);
history.push(`/rc/${isDashboard ? '' : link}`);
toggleDrawer(false)();
};
diff --git a/src/v2/components/Social/index.jsx b/src/v2/components/Social/index.jsx
index 8d3d4a07..86412cf0 100644
--- a/src/v2/components/Social/index.jsx
+++ b/src/v2/components/Social/index.jsx
@@ -1,6 +1,7 @@
// @flow
import React from 'react';
import {map} from 'lodash/fp';
+import Mixpanel from 'v2/mixpanel';
import {ReactComponent as discord} from './assets/discord.svg';
import {ReactComponent as medium} from './assets/medium.svg';
@@ -44,8 +45,16 @@ const links: Link[] = [
];
const Social = () => {
const classes = useStyles();
+
+ const handleLink = () => social => Mixpanel.track(`Visit ${social}`);
+
const renderLink = ({name, link, icon: Icon}: Link) => (
-
+
);
diff --git a/src/v2/components/TourDeSol/Cards/index.jsx b/src/v2/components/TourDeSol/Cards/index.jsx
index cbd16065..ecd3973c 100644
--- a/src/v2/components/TourDeSol/Cards/index.jsx
+++ b/src/v2/components/TourDeSol/Cards/index.jsx
@@ -9,8 +9,8 @@ import useStyles from './styles';
const Cards = () => {
const classes = useStyles();
- const {cluster} = NodesStore;
- const {nodes} = cluster;
+ const {cluster, validators} = NodesStore;
+
const cards = [
{
title: 'Stage Duration Blocks',
@@ -44,7 +44,7 @@ const Cards = () => {
},
{
title: '# of Active Validators',
- value: nodes.length,
+ value: validators.length,
changes: '',
period: 'since yesterday',
},
diff --git a/src/v2/components/TourDeSol/Ranking/index.jsx b/src/v2/components/TourDeSol/Ranking/index.jsx
index 53425ca2..04046bac 100644
--- a/src/v2/components/TourDeSol/Ranking/index.jsx
+++ b/src/v2/components/TourDeSol/Ranking/index.jsx
@@ -9,14 +9,12 @@ import useStyles from './styles';
const Ranking = () => {
const classes = useStyles();
- const {
- cluster: {voting},
- } = NodesStore;
+ const {validators} = NodesStore;
const maxVal = compose(
get('stake'),
maxBy('stake'),
- )(voting);
+ )(validators);
const renderNode = node => {
const position = (node.stake * 100) / maxVal;
@@ -41,7 +39,7 @@ const Ranking = () => {
Top Validator Ranking
-