File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
web/src/pages/Home/TopJurors Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const Container = styled.div`
1111 display: flex;
1212 font-size: 12px !important;
1313 &::before {
14- content: "Votes ";
14+ content: "Coherency ";
1515 }
1616 color: ${ ( { theme } ) => theme . secondaryText } ;
1717 align-items: center;
@@ -21,15 +21,13 @@ const Container = styled.div`
2121 css `
2222 font-size: 14px !important;
2323 justify-content: center;
24- &::before {
25- content: "Coherent Votes";
26- }
2724 `
2825 ) }
2926` ;
3027
3128const coherentVotesTooltipMsg =
32- "This is the ratio of coherent votes made by a juror: " +
29+ "This is the percentage of coherent votes made by a juror." +
30+ " Hover to see the ratio of coherent votes : " +
3331 "the number in the left is the number of times where the juror " +
3432 "voted coherently and the number in the right is the total number of times " +
3533 "the juror voted" ;
Original file line number Diff line number Diff line change 1+ import { Tooltip } from "@kleros/ui-components-library" ;
12import React from "react" ;
23import styled from "styled-components" ;
34
@@ -18,7 +19,13 @@ interface ICoherency {
1819const Coherency : React . FC < ICoherency > = ( { totalCoherentVotes, totalResolvedVotes } ) => {
1920 const coherenceRatio = `${ totalCoherentVotes } /${ totalResolvedVotes } ` ;
2021
21- return < Container > { coherenceRatio } </ Container > ;
22+ return (
23+ < Container >
24+ < Tooltip text = { coherenceRatio } > { getPercent ( totalCoherentVotes , totalResolvedVotes ) } </ Tooltip >
25+ </ Container >
26+ ) ;
2227} ;
2328
29+ const getPercent = ( num : number , den : number ) : string => `${ Math . floor ( ( num * 100 ) / den ) } %` ;
30+
2431export default Coherency ;
You can’t perform that action at this time.
0 commit comments