From 9e76f85aff8ebd87102c298578d6aeef7806098e Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 28 Jul 2021 13:08:28 +0200 Subject: [PATCH] fiat and lbc tabs coming along --- ui/page/wallet/view.jsx | 57 +++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/ui/page/wallet/view.jsx b/ui/page/wallet/view.jsx index ba284ffe1..c39285f3e 100644 --- a/ui/page/wallet/view.jsx +++ b/ui/page/wallet/view.jsx @@ -19,23 +19,52 @@ const WalletPage = (props: Props) => { const showIntro = totalBalance === 0; const loading = totalBalance === undefined; + const TAB_LBC_TRANSACTIONS = 'TabLBCTransactions'; + const TAB_FIAT_TRANSACTIONS = 'TabFiatTransactions'; + + const [activeTab, setActiveTab] = React.useState(TAB_LBC_TRANSACTIONS); + return ( - {loading && ( -
- -
- )} - {!loading && ( + {/* tabs to switch between fiat and lbc */} +

{ + document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline'; + document.getElementsByClassName('fiat-transactions')[0].style.display = 'none'; + }} + >LBC Transactions

+

{ + document.getElementsByClassName('lbc-transactions')[0].style.display = 'none'; + document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline'; + }} + >Fiat Transactions

+
+ {/* if the transactions are loading */} + { loading && ( +
+ +
+ )} + {/* when the transactions are finished loading */} + { !loading && ( + <> + {showIntro ? ( + + ) : ( +
+ + +
+ )} + + )} +
+ {( <> - {showIntro ? ( - - ) : ( -
- - -
- )} +
+

Here's your fiat transactions

+
)}