mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 07:51:31 +00:00
More touchups
This commit is contained in:
parent
56facb7b9e
commit
974ad1f379
3 changed files with 22 additions and 20 deletions
|
@ -28,7 +28,7 @@ const WalletBalance = (props: Props) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>{1 == 1 && <Card
|
<>{1 == 1 && <Card
|
||||||
title={<><Icon size="18" icon={ICONS.FINANCE} />{accountDetails && accountDetails.total_received_unpaid/100} || 0 USD</>}
|
title={<><Icon size="18" icon={ICONS.FINANCE} />{accountDetails && accountDetails.total_received_unpaid/100 || 0} USD</>}
|
||||||
subtitle={
|
subtitle={
|
||||||
<I18nMessage>
|
<I18nMessage>
|
||||||
This is your remaining balance that can still be withdrawn to your bank account
|
This is your remaining balance that can still be withdrawn to your bank account
|
||||||
|
@ -92,7 +92,7 @@ const WalletBalance = (props: Props) => {
|
||||||
|
|
||||||
<div className="section__actions">
|
<div className="section__actions">
|
||||||
<Button button="primary" label={__('Receive Payout')} icon={ICONS.SEND} />
|
<Button button="primary" label={__('Receive Payout')} icon={ICONS.SEND} />
|
||||||
<Button button="secondary" label={__('Account Configuration')} icon={ICONS.SETTINGS} navigate={`/$/${PAGES.SETTINGS_STRIPE_ACCOUNT}`} />
|
<Button button="secondary" label={__('Account Configuration')} icon={ICONS.SETTINGS} navigate={`/$/${PAGES.SETTINGS_STRIPE_CARD}`} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ const WalletBalance = (props: Props) => {
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{(!paymentHistoryTransactions || paymentHistoryTransactions.length === 0) && <p style={{textAlign:"center", marginTop: '20px', fontSize: '13px', color: 'rgb(171, 171, 171)'}}>No Transactions</p>}
|
{(!accountTransactions || accountTransactions.length === 0) && <p style={{textAlign:"center", marginTop: '20px', fontSize: '13px', color: 'rgb(171, 171, 171)'}}>No Transactions</p>}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,11 +75,30 @@ const WalletPage = (props: Props) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// calculate account transactions section
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
(async function(){
|
(async function(){
|
||||||
try {
|
try {
|
||||||
const response = await getAccountStatus();
|
const response = await getAccountStatus();
|
||||||
|
|
||||||
|
setAccountStatusResponse(response);
|
||||||
|
|
||||||
|
// TODO: some weird naming clash hence getAccountTransactionsa
|
||||||
|
const getAccountTransactions = await getAccountTransactionsa();
|
||||||
|
|
||||||
|
setAccountTransactionResponse(getAccountTransactions)
|
||||||
|
|
||||||
|
} catch (err){
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// populate customer payment data
|
||||||
|
React.useEffect(() => {
|
||||||
|
(async function(){
|
||||||
|
try {
|
||||||
// get card payments customer has made
|
// get card payments customer has made
|
||||||
const customerTransactionResponse = await getPaymentHistory();
|
const customerTransactionResponse = await getPaymentHistory();
|
||||||
|
|
||||||
|
@ -91,25 +110,8 @@ const WalletPage = (props: Props) => {
|
||||||
|
|
||||||
setTotalTippedAmount(totalTippedAmount / 100);
|
setTotalTippedAmount(totalTippedAmount / 100);
|
||||||
|
|
||||||
console.log(customerTransactionResponse);
|
|
||||||
|
|
||||||
setCustomerTransactions(customerTransactionResponse)
|
setCustomerTransactions(customerTransactionResponse)
|
||||||
|
|
||||||
console.log('account status');
|
|
||||||
|
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
setAccountStatusResponse(response);
|
|
||||||
|
|
||||||
// TODO: some weird naming clash hence getAccountTransactionsa
|
|
||||||
const getAccountTransactions = await getAccountTransactionsa();
|
|
||||||
|
|
||||||
console.log('transactions');
|
|
||||||
|
|
||||||
setAccountTransactionResponse(getAccountTransactions)
|
|
||||||
|
|
||||||
console.log(getAccountTransactions);
|
|
||||||
|
|
||||||
} catch (err){
|
} catch (err){
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue