File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
web/src/pages/Home/TopJurors Expand file tree Collapse file tree 1 file changed +14
-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,16 @@ 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+ { ! isUndefined ( topJurors ) && topJurors . length === 0 ? (
48+ < StyledLabel > There are no jurors staked yet.</ StyledLabel >
49+ ) : (
50+ < ListContainer >
51+ < Header />
52+ { ! isUndefined ( topJurors )
53+ ? topJurors . map ( ( juror ) => < JurorCard key = { juror . rank } address = { juror . id } { ...juror } /> )
54+ : [ ...Array ( 5 ) ] . map ( ( _ , i ) => < SkeletonDisputeListItem key = { i } /> ) }
55+ </ ListContainer >
56+ ) }
4957 </ Container >
5058 ) ;
5159} ;
You can’t perform that action at this time.
0 commit comments