diff --git a/examples/wallet/app/components/Listing/ListingColumn.js b/examples/wallet/app/components/Listing/ListingColumn.js
new file mode 100644
index 0000000..e0895e4
--- /dev/null
+++ b/examples/wallet/app/components/Listing/ListingColumn.js
@@ -0,0 +1,14 @@
+// @flow
+import React from 'react';
+import type { Node } from 'react';
+import Col from 'react-bootstrap/Col';
+
+type Props = {
+ children: Node
+};
+
+export default ({ children, ...other }: Props) => (
+
+ {children}
+
+);
diff --git a/examples/wallet/app/components/ListingRow.js b/examples/wallet/app/components/Listing/ListingRow.js
similarity index 58%
rename from examples/wallet/app/components/ListingRow.js
rename to examples/wallet/app/components/Listing/ListingRow.js
index 00531d8..08ee0ad 100644
--- a/examples/wallet/app/components/ListingRow.js
+++ b/examples/wallet/app/components/Listing/ListingRow.js
@@ -5,13 +5,13 @@ import Row from 'react-bootstrap/Row';
import styles from './ListingRow.scss';
type Props = {
- key: string | number,
+ itemKey: string | number,
className?: string,
children: Node
};
-export default ({ key, className, children }: Props) => (
-
+export default ({ itemKey, className, children }: Props) => (
+
{children}
);
diff --git a/examples/wallet/app/components/ListingRow.scss b/examples/wallet/app/components/Listing/ListingRow.scss
similarity index 100%
rename from examples/wallet/app/components/ListingRow.scss
rename to examples/wallet/app/components/Listing/ListingRow.scss
diff --git a/examples/wallet/app/components/Listing/ListingTable.js b/examples/wallet/app/components/Listing/ListingTable.js
new file mode 100644
index 0000000..21a3db8
--- /dev/null
+++ b/examples/wallet/app/components/Listing/ListingTable.js
@@ -0,0 +1,14 @@
+// @flow
+import React from 'react';
+import type { Node } from 'react';
+import Container from 'react-bootstrap/Container';
+
+type Props = {
+ children: Node
+};
+
+export default ({ children, ...other }: Props) => (
+
+ {children}
+
+);
diff --git a/examples/wallet/app/components/StakePoolList.js b/examples/wallet/app/components/StakePoolList.js
index 814d3e1..41a5cf5 100644
--- a/examples/wallet/app/components/StakePoolList.js
+++ b/examples/wallet/app/components/StakePoolList.js
@@ -1,13 +1,13 @@
// @flow
import React from 'react';
import Button from 'react-bootstrap/Button';
-import Col from 'react-bootstrap/Col';
import Row from 'react-bootstrap/Row';
-import Container from 'react-bootstrap/Container';
+import ListingColumn from './Listing/ListingColumn';
+import ListingTable from './Listing/ListingTable';
import type { NewDelegation, PoolId, Delegation } from '../models';
import type { PoolSelectionHandler } from './StakeDelegation';
import { percentageFromParts } from '../utils/proportionsHelper';
-import ListingRow from './ListingRow';
+import ListingRow from './Listing/ListingRow';
import styles from './StakePoolList.scss';
type Props = {
@@ -24,7 +24,7 @@ export default ({
newDelegation
}: Props) => {
return (
-
+
{stakePools &&
stakePools.map((poolId: PoolId) => {
const activeDelegation = newDelegation[poolId];
@@ -36,15 +36,17 @@ export default ({
const currentDelegationPercentage =
currentDelegation && percentageFromParts(currentDelegation, poolId);
return (
-
-
+
+
{poolId}
-
-
+
+
{newDelegationPercentage}%
-
- {currentDelegationPercentage}%
-
+
+
+ {currentDelegationPercentage}%
+
+
-
+
);
})}
-
+
);
};
diff --git a/examples/wallet/app/components/TransactionListing.js b/examples/wallet/app/components/TransactionListing.js
index d316233..c62fc31 100644
--- a/examples/wallet/app/components/TransactionListing.js
+++ b/examples/wallet/app/components/TransactionListing.js
@@ -1,12 +1,11 @@
// @flow
import React from 'react';
-import Col from 'react-bootstrap/Col';
-import Container from 'react-bootstrap/Container';
import curry from 'lodash/curry';
import ClickableBox from 'clickable-box';
import config from 'config';
// FIXME: this is obviously not portable to a webapp
import { shell } from 'electron';
+import ListingTable from './Listing/ListingTable';
import type {
Transaction,
Address,
@@ -14,7 +13,8 @@ import type {
TransactionOutput
} from '../models';
import styles from './TransactionListing.scss';
-import ListingRow from './ListingRow';
+import ListingRow from './Listing/ListingRow';
+import ListingColumn from './Listing/ListingColumn';
type Props = {
transactions: Array,
@@ -23,9 +23,9 @@ type Props = {
export default ({ transactions, myAddress }: Props) => {
return (
-
+
{transactions.map(curry(transactionToRow)(myAddress))}
-
+
);
};
@@ -55,11 +55,11 @@ const transactionToRow = (
return null;
}
return (
-
-
+
+
{transactionType}
-
-
+
+
shell.openExternal(
@@ -71,16 +71,16 @@ const transactionToRow = (
>
{id}
-
+
{/* TODO show date */}
- 04/20/2020
-
+ 04/20/2020
+
{inputSum > outputSum ? inputSum : outputSum}
-
+
{/* TODO show confirmations */}
-
+
pending
-
+
{/* TODO add a dropdown with details (inpt sum, output sum, ) */}
);