Bladeren bron

hide empty waiting validators list

Joystream Stats 3 jaren geleden
bovenliggende
commit
b11a63a810
1 gewijzigde bestanden met toevoegingen van 23 en 17 verwijderingen
  1. 23 17
      src/components/Validators/index.tsx

+ 23 - 17
src/components/Validators/index.tsx

@@ -181,23 +181,29 @@ class Validators extends Component<IProps, IState> {
               rewardPoints={rewardPoints}
             />
           ))}
-          <hr />
-          Waiting:
-          {waiting.map((v) => (
-            <MemberBox
-              key={v}
-              id={0}
-              account={v}
-              placement={"top"}
-              councils={councils}
-              handle={handles[v]}
-              members={members}
-              posts={posts}
-              proposals={proposals}
-              startTime={startTime}
-              validators={validators}
-            />
-          ))}
+          {waiting.length ? (
+            <div>
+              <hr />
+              Waiting:
+              {waiting.map((v) => (
+                <MemberBox
+                  key={v}
+                  id={0}
+                  account={v}
+                  placement={"top"}
+                  councils={councils}
+                  handle={handles[v]}
+                  members={members}
+                  posts={posts}
+                  proposals={proposals}
+                  startTime={startTime}
+                  validators={validators}
+                />
+              ))}
+            </div>
+          ) : (
+            ""
+          )}
         </div>
       </div>
     );