wallet tabs

This commit is contained in:
zeppi 2021-08-17 14:46:30 -04:00
parent 78801ae82d
commit b616deb6ef

View file

@ -159,77 +159,80 @@ const WalletPage = (props: Props) => {
return ( return (
<> <>
{/* @if TARGET='web' */} {stripeEnvironment && (
<Page> <Page>
<Tabs onChange={onTabChange} index={tabIndex}> <Tabs onChange={onTabChange} index={tabIndex}>
<TabList className="tabs__list--collection-edit-page"> <TabList className="tabs__list--collection-edit-page">
<Tab>{__('LBRY Credits')}</Tab> <Tab>{__('LBRY Credits')}</Tab>
<Tab>{__('Account History')}</Tab> <Tab>{__('Account History')}</Tab>
<Tab>{__('Payment History')}</Tab> <Tab>{__('Payment History')}</Tab>
</TabList> </TabList>
<TabPanels> <TabPanels>
<TabPanel> <TabPanel>
<div className="section card-stack"> <div className="section card-stack">
<div className="lbc-transactions"> <div className="lbc-transactions">
{/* if the transactions are loading */} {/* if the transactions are loading */}
{loading && ( {loading && (
<div className="main--empty"> <div className="main--empty">
<Spinner delayed /> <Spinner delayed />
</div> </div>
)} )}
{/* when the transactions are finished loading */} {/* when the transactions are finished loading */}
{!loading && ( {!loading && (
<> <>
{showIntro ? ( {showIntro ? (
<YrblWalletEmpty includeWalletLink /> <YrblWalletEmpty includeWalletLink />
) : ( ) : (
<div className="card-stack"> <div className="card-stack">
<WalletBalance /> <WalletBalance />
<TxoList search={search} /> <TxoList search={search} />
</div> </div>
)} )}
</> </>
)} )}
</div>
</div> </div>
</div> </TabPanel>
</TabPanel> <TabPanel>
<TabPanel> <div className="section card-stack">
<div className="section card-stack"> <WalletFiatBalance accountDetails={accountStatusResponse} />
<WalletFiatBalance accountDetails={accountStatusResponse} /> <WalletFiatAccountHistory transactions={accountTransactionResponse} />
<WalletFiatAccountHistory transactions={accountTransactionResponse} /> </div>
</div> </TabPanel>
</TabPanel> <TabPanel>
<TabPanel> <div className="section card-stack">
<div className="section card-stack"> <WalletFiatPaymentBalance
<WalletFiatPaymentBalance transactions={customerTransactions} accountDetails={accountStatusResponse} /> transactions={customerTransactions}
<WalletFiatPaymentHistory transactions={customerTransactions} /> accountDetails={accountStatusResponse}
</div> />
</TabPanel> <WalletFiatPaymentHistory transactions={customerTransactions} />
</TabPanels> </div>
</Tabs> </TabPanel>
</Page> </TabPanels>
{/* @endif */} </Tabs>
{/* @if TARGET='app' */} </Page>
<Page> )}
{loading && ( {!stripeEnvironment && (
<div className="main--empty"> <Page>
<Spinner delayed /> {loading && (
</div> <div className="main--empty">
)} <Spinner delayed />
{!loading && ( </div>
<> )}
{showIntro ? ( {!loading && (
<YrblWalletEmpty includeWalletLink /> <>
) : ( {showIntro ? (
<div className="card-stack"> <YrblWalletEmpty includeWalletLink />
<WalletBalance /> ) : (
<TxoList search={search} /> <div className="card-stack">
</div> <WalletBalance />
)} <TxoList search={search} />
</> </div>
)} )}
</Page> </>
{/* @endif */} )}
</Page>
)}
</> </>
); );
}; };