diff --git a/ui/page/wallet/view.jsx b/ui/page/wallet/view.jsx index 6ab10482b..f324c2b55 100644 --- a/ui/page/wallet/view.jsx +++ b/ui/page/wallet/view.jsx @@ -80,14 +80,44 @@ const WalletPage = (props: Props) => { })(); }, []); - React.useEffect(() => { - // if (tab === 'currency') { - if (1 === 1) { - document.getElementsByClassName('lbc-transactions')[0].style.display = 'none'; - document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline'; + function focusLBCTab(){ + document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline'; + document.getElementsByClassName('fiat-transactions')[0].style.display = 'none'; + document.getElementsByClassName('payment-history-tab')[0].style.display = 'none'; - document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none'; - document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'underline'; + document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'underline'; + document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'none'; + document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'none'; + + } + + function focusAccountHistoryTab(){ + document.getElementsByClassName('lbc-transactions')[0].style.display = 'none'; + document.getElementsByClassName('payment-history-tab')[0].style.display = 'none'; + document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline'; + + document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none'; + document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'underline'; + document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'none'; + + } + + function focusPaymentHistoryTab(){ + document.getElementsByClassName('lbc-transactions')[0].style.display = 'none'; + document.getElementsByClassName('fiat-transactions')[0].style.display = 'none'; + document.getElementsByClassName('payment-history-tab')[0].style.display = 'inline'; + + document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none'; + document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'none'; + document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'underline'; + + } + + // select the first tab + React.useEffect(() => { + // if (tab === 'account-history') { + if (1 === 1) { + focusAccountHistoryTab() } }, []); @@ -102,23 +132,22 @@ const WalletPage = (props: Props) => {