@@ -4,7 +4,7 @@ import { landscapeStyle } from "styles/landscapeStyle";
44import { Card as _Card } from "@kleros/ui-components-library" ;
55import PixelArt from "pages/Dashboard/JurorInfo/PixelArt" ;
66import Coherency from "pages/Dashboard/JurorInfo/Coherency" ;
7- import Template from "./Template" ;
7+ import Template , { Title , ParagraphsContainer , LeftContentContainer } from "./Template" ;
88
99const Card = styled ( _Card ) `
1010 display: flex;
@@ -25,67 +25,79 @@ const Card = styled(_Card)`
2525 ) }
2626` ;
2727
28- const Title = styled . h1 `
29- margin-bottom: 0;
30- ` ;
31-
32- const LeftContentContainer = styled . div `
33- display: flex;
34- gap: 18px;
35- flex-direction: column;
36- ` ;
28+ const leftPageContents = [
29+ {
30+ title : "Juror Level 1: Phytagoras" ,
31+ paragraphs : [
32+ "Jurors are classified into distinct levels according to their performance starting from Level 1." ,
33+ "Level 1: Jurors with 0 cases arbitrated, OR Jurors with ≥ 1 case arbitrated with 0-70% of coherent votes." ,
34+ ] ,
35+ } ,
36+ {
37+ title : "Juror Level 2: Socrates" ,
38+ paragraphs : [ "Level 2: Jurors with ≥ 3 cases arbitrated with 70%-80% of coherent votes." ] ,
39+ } ,
40+ {
41+ title : "Juror Level 3: Plato" ,
42+ paragraphs : [ "Level 3: Jurors with ≥ 7 cases arbitrated with 80%-90% of coherent votes." ] ,
43+ } ,
44+ {
45+ title : "Juror Level 4: Aristotle" ,
46+ paragraphs : [ "Level 4: Jurors with ≥ 10 cases arbitrated with more than 90% of coherent votes." ] ,
47+ } ,
48+ {
49+ title : "Juror Level 0: Diogenes" ,
50+ paragraphs : [
51+ "There's a level for the low-performance/lazy jurors. Level 0: Jurors with ≥ 3 cases arbitrated" +
52+ " with less than 50% of coherent votes." ,
53+ ] ,
54+ } ,
55+ ] ;
3756
3857const userLevelData = [
3958 {
4059 level : 1 ,
41- title : "Pythagoras " ,
60+ title : "Phytagoras " ,
4261 totalCoherent : 6 ,
4362 totalResolvedDisputes : 10 ,
44- firstParagraph : "Jurors are classified into distinct levels according to their performance starting from Level 1." ,
45- secondParagraph :
46- "Level 1: Jurors with 0 cases arbitrated, OR Jurors with ≥ 1 case arbitrated with 0-70% of coherent votes." ,
4763 } ,
4864 {
4965 level : 2 ,
5066 title : "Socrates" ,
5167 totalCoherent : 7 ,
5268 totalResolvedDisputes : 10 ,
53- firstParagraph : "Level 2: Jurors with ≥ 3 cases arbitrated with 70%-80% of coherent votes." ,
5469 } ,
5570 {
5671 level : 3 ,
5772 title : "Plato" ,
5873 totalCoherent : 8 ,
5974 totalResolvedDisputes : 10 ,
60- firstParagraph : "Level 3: Jurors with ≥ 7 cases arbitrated with 80%-90% of coherent votes." ,
6175 } ,
6276 {
6377 level : 4 ,
64- title : "Aristoteles " ,
78+ title : "Aristotle " ,
6579 totalCoherent : 9 ,
6680 totalResolvedDisputes : 10 ,
67- firstParagraph : "Level 4: Jurors with ≥ 10 cases arbitrated with more than 90% of coherent votes." ,
6881 } ,
6982 {
7083 level : 0 ,
7184 title : "Diogenes" ,
7285 totalCoherent : 3 ,
7386 totalResolvedDisputes : 10 ,
74- firstParagraph :
75- "There's a level for the low-performance/lazy jurors. Level 0: Jurors with ≥ 3 cases arbitrated" +
76- " with less than 50% of coherent votes." ,
7787 } ,
7888] ;
7989
8090const LeftContent : React . FC < { currentPage : number } > = ( { currentPage } ) => {
81- const userData = userLevelData [ currentPage - 1 ] ;
91+ const { title, paragraphs } = leftPageContents [ currentPage - 1 ] ;
92+
8293 return (
8394 < LeftContentContainer >
84- < Title >
85- Juror Level { userData . level } : { userData . title }
86- </ Title >
87- < label > { userData . firstParagraph } </ label >
88- { userData . secondParagraph ? < label > { userData . secondParagraph } </ label > : null }
95+ < Title > { title } </ Title >
96+ < ParagraphsContainer >
97+ { paragraphs . map ( ( paragraph , index ) => (
98+ < label key = { index } > { paragraph } </ label >
99+ ) ) }
100+ </ ParagraphsContainer >
89101 </ LeftContentContainer >
90102 ) ;
91103} ;
@@ -119,7 +131,7 @@ const Level: React.FC<ILevel> = ({ toggleMiniGuide }) => {
119131 onClose = { toggleMiniGuide }
120132 currentPage = { currentPage }
121133 setCurrentPage = { setCurrentPage }
122- numPages = { userLevelData . length }
134+ numPages = { leftPageContents . length }
123135 isOnboarding = { false }
124136 />
125137 ) ;
0 commit comments