File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
web/src/pages/Home/TopJurors Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ const ListContainer = styled.div`
2929 ) }
3030` ;
3131
32+ const StyledLabel = styled . label `
33+ font-size: 16px;
34+ ` ;
35+
3236const TopJurors : React . FC = ( ) => {
3337 const { data : queryJurors } = useTopUsersByCoherenceScore ( ) ;
3438
@@ -40,12 +44,24 @@ const TopJurors: React.FC = () => {
4044 return (
4145 < Container >
4246 < Title > Top Jurors</ Title >
43- < ListContainer >
44- < Header />
45- { ! isUndefined ( topJurors )
46- ? topJurors . map ( ( juror ) => < JurorCard key = { juror . rank } address = { juror . id } { ...juror } /> )
47- : [ ...Array ( 5 ) ] . map ( ( _ , i ) => < SkeletonDisputeListItem key = { i } /> ) }
48- </ ListContainer >
47+
48+ { ! isUndefined ( topJurors ) && topJurors . length > 0 ? (
49+ < ListContainer >
50+ < Header />
51+ { topJurors . map ( ( juror ) => (
52+ < JurorCard key = { juror . rank } address = { juror . id } { ...juror } />
53+ ) ) }
54+ </ ListContainer >
55+ ) : ! isUndefined ( topJurors ) && topJurors . length === 0 ? (
56+ < StyledLabel > There are no jurors staked yet.</ StyledLabel >
57+ ) : (
58+ < ListContainer >
59+ < Header />
60+ { [ ...Array ( 5 ) ] . map ( ( _ , i ) => (
61+ < SkeletonDisputeListItem key = { i } />
62+ ) ) }
63+ </ ListContainer >
64+ ) }
4965 </ Container >
5066 ) ;
5167} ;
You can’t perform that action at this time.
0 commit comments