From 815799a389c45e303b50aed638267937511c33fb Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 19 Aug 2021 17:11:51 +0200 Subject: [PATCH] almost ready for refactor --- ui/component/txoList/view.jsx | 166 +++++++++--------- .../walletFiatAccountHistory/view.jsx | 105 ++++++----- .../walletFiatPaymentHistory/view.jsx | 98 +++++------ ui/page/wallet/view.jsx | 10 +- 4 files changed, 181 insertions(+), 198 deletions(-) diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index 9c9ce8414..1b2f4f95a 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -373,90 +373,92 @@ function TxoList(props: Props) { // fiat section :
-
-
- {/*
*/} - {/* */} - {/* {__('Type')}*/} - {/* */} - {/* */} - {/* }*/} - {/* value={type || 'all'}*/} - {/* onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab, currency: 'fiat' })}*/} - {/* >*/} - {/* {Object.values(TXO.DROPDOWN_TYPES).map((v) => {*/} - {/* const stringV = String(v);*/} - {/* return (*/} - {/* */} - {/* );*/} - {/* })}*/} - {/* */} - {/*
*/} - {(type === TXO.SENT || type === TXO.RECEIVED) && ( -
- handleChange({ dkey: TXO.SUB_TYPE, value: e.target.value, tab, currency: 'fiat' })} - > - {Object.values(TXO.DROPDOWN_SUBTYPES).map((v) => { - const stringV = String(v); - return ( - - ); - })} - -
- )} - {!hideStatus && ( -
- - -
-
-
-
- )} +
+
+
+ {/*
*/} + {/* */} + {/* {__('Type')}*/} + {/* */} + {/* */} + {/* }*/} + {/* value={type || 'all'}*/} + {/* onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab, currency: 'fiat' })}*/} + {/* >*/} + {/* {Object.values(TXO.DROPDOWN_TYPES).map((v) => {*/} + {/* const stringV = String(v);*/} + {/* return (*/} + {/* */} + {/* );*/} + {/* })}*/} + {/* */} + {/*
*/} + {(type === TXO.SENT || type === TXO.RECEIVED) && ( +
+ handleChange({ dkey: TXO.SUB_TYPE, value: e.target.value, tab, currency: 'fiat' })} + > + {Object.values(TXO.DROPDOWN_SUBTYPES).map((v) => { + const stringV = String(v); + return ( + + ); + })} + +
+ )} + {!hideStatus && ( +
+ + +
+
+
+
+ )} +
+ {/* listing of the transactions */} + { fiatType === 'incoming' && } + { fiatType === 'outgoing' && } +
- {/* listing of the transactions */} - { fiatType === 'incoming' && } - { fiatType === 'outgoing' && } -
} diff --git a/ui/component/walletFiatAccountHistory/view.jsx b/ui/component/walletFiatAccountHistory/view.jsx index 49b1ff299..970ee824b 100644 --- a/ui/component/walletFiatAccountHistory/view.jsx +++ b/ui/component/walletFiatAccountHistory/view.jsx @@ -26,62 +26,55 @@ const WalletBalance = (props: Props) => { } return ( - <> -
- - - - - - - - - - - - - - {accountTransactions && - accountTransactions.map((transaction) => ( - - - - - - - - - - ))} - -
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Processing Fee')}{__('Odysee Fee')}{__('Received Amount')}
{moment(transaction.created_at).format('LLL')} - - ${transaction.tipped_amount / 100}${transaction.transaction_fee / 100}${transaction.application_fee / 100}${transaction.received_amount / 100}
- {!accountTransactions &&

No Transactions

} -
- - )} - /> - +
+ + + + + + + + + + + + + + {accountTransactions && + accountTransactions.map((transaction) => ( + + + + + + + + + + ))} + +
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Processing Fee')}{__('Odysee Fee')}{__('Received Amount')}
{moment(transaction.created_at).format('LLL')} + + ${transaction.tipped_amount / 100}${transaction.transaction_fee / 100}${transaction.application_fee / 100}${transaction.received_amount / 100}
+ {!accountTransactions &&

No Transactions

} +
+ ); }; diff --git a/ui/component/walletFiatPaymentHistory/view.jsx b/ui/component/walletFiatPaymentHistory/view.jsx index 69bbc49d9..861a91982 100644 --- a/ui/component/walletFiatPaymentHistory/view.jsx +++ b/ui/component/walletFiatPaymentHistory/view.jsx @@ -53,58 +53,52 @@ const WalletBalance = (props: Props) => { return ( <>
- -
- - - - - - - - - - - - - {accountTransactions && - accountTransactions.map((transaction) => ( - - - - - - - - - ))} - -
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Card Last 4')}{__('Anonymous')}
{moment(transaction.created_at).format('LLL')} - - ${transaction.tipped_amount / 100}{lastFour}{transaction.private_tip ? 'Yes' : 'No'}
- {(!accountTransactions || accountTransactions.length === 0) &&

No Transactions

} -
- - } - /> +
+ + + + + + + + + + + + + {accountTransactions && + accountTransactions.map((transaction) => ( + + + + + + + + + ))} + +
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Card Last 4')}{__('Anonymous')}
{moment(transaction.created_at).format('LLL')} + + ${transaction.tipped_amount / 100}{lastFour}{transaction.private_tip ? 'Yes' : 'No'}
+ {(!accountTransactions || accountTransactions.length === 0) &&

No Transactions

} +
); diff --git a/ui/page/wallet/view.jsx b/ui/page/wallet/view.jsx index 7e19cd161..144eccd84 100644 --- a/ui/page/wallet/view.jsx +++ b/ui/page/wallet/view.jsx @@ -164,7 +164,7 @@ const WalletPage = (props: Props) => { {__('Balance')} {__('Transactions')} {__('Subscriptions')} - {__('Analytics')} + {/*{__('Analytics')}*/} @@ -196,13 +196,7 @@ const WalletPage = (props: Props) => {
- - -
-
- -
- +

Coming soon!