fiat and lbc tabs coming along
This commit is contained in:
parent
dae121bfe3
commit
1978b936ad
1 changed files with 43 additions and 14 deletions
|
@ -19,13 +19,34 @@ 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 (
|
||||
<Page>
|
||||
{/* tabs to switch between fiat and lbc */}
|
||||
<h2 style={{display: 'inline-block', paddingBottom: '14px', marginRight: '10px', textUnderlineOffset: '4px', textDecoration: 'underline'}}
|
||||
onClick={() => {
|
||||
document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline';
|
||||
document.getElementsByClassName('fiat-transactions')[0].style.display = 'none';
|
||||
}}
|
||||
>LBC Transactions</h2>
|
||||
<h2 style={{display: 'inline-block'}}
|
||||
onClick={() => {
|
||||
document.getElementsByClassName('lbc-transactions')[0].style.display = 'none';
|
||||
document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline';
|
||||
}}
|
||||
>Fiat Transactions</h2>
|
||||
<div className="lbc-transactions">
|
||||
{/* if the transactions are loading */}
|
||||
{ loading && (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
)}
|
||||
{/* when the transactions are finished loading */}
|
||||
{ !loading && (
|
||||
<>
|
||||
{showIntro ? (
|
||||
|
@ -38,6 +59,14 @@ const WalletPage = (props: Props) => {
|
|||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{(
|
||||
<>
|
||||
<div className="fiat-transactions">
|
||||
<h2>Here's your fiat transactions</h2>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue