Prechádzať zdrojové kódy

Modified Transactions View to filter by account

singulart 3 rokov pred
rodič
commit
e2a89ec390
1 zmenil súbory, kde vykonal 3 pridanie a 6 odobranie
  1. 3 6
      src/components/Transactions/index.tsx

+ 3 - 6
src/components/Transactions/index.tsx

@@ -48,8 +48,6 @@ class Transactions extends React.Component<IProps, IState> {
 
     const { address, transactions } = this.state;
 
-    if (!transactions) return <Loading target="transactions" />;
-
     return (
       <div>
         <h3>Transactions</h3>
@@ -61,11 +59,9 @@ class Transactions extends React.Component<IProps, IState> {
               48 character string starting with 5
             </Form.Text>
           </Form.Group>
-
-          <Button variant="primary" onClick={() => this.accountTxFilterChanged(address)}>
-            Submit
-          </Button>
         </Form>
+        <>
+        { (!transactions || transactions.length === 0) ? <div/> :
         <ListGroup>
           <ListGroup.Item key={`header`}>
             <div className="d-flex flex-row justify-content-between">
@@ -81,6 +77,7 @@ class Transactions extends React.Component<IProps, IState> {
             </ListGroup.Item>
           ))}
         </ListGroup>
+        } </>
       </div>
     );
   }