Ver Fonte

hide empty waiting validators list

Joystream Stats há 3 anos atrás
pai
commit
b11a63a810
1 ficheiros alterados com 23 adições e 17 exclusões
  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>
     );