forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thisyahlen/feat: wallet-list-desktop (binary-com#9829)
* fix(cashier): 🐛 fix unable to access CFD-DerivX transfer * feat(wallets): 📦 add `@deriv/wallets` workspace * fix(wallets): 💚 fix CI build * feat(api): ✨ share a single instance of `QueryClient` in `APIProvider` * Merge branch 'master' into farzin/next * chore: add wallet header list data for desktop --------- Co-authored-by: Farzin Mirzaie <farzin@deriv.com>
- Loading branch information
1 parent
43a4298
commit c3f101d
Showing
4 changed files
with
68 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/wallets/src/components/WalletList/WalletList.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.account-list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-top: 2rem; | ||
} | ||
|
||
h1, | ||
.currency, | ||
.balance, | ||
.account-category { | ||
font-size: 3rem; | ||
} | ||
|
||
.account-item { | ||
border: 1px solid #ccc; | ||
padding: 10px; | ||
border-radius: 5px; | ||
background-color: #f5f5f5; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
display: flex; | ||
justify-content: space-between; | ||
width: 90%; | ||
} | ||
|
||
.currency { | ||
font-weight: bold; | ||
} | ||
|
||
.account-category { | ||
font-style: italic; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { useWalletAccountsList } from '@deriv/api'; | ||
import './WalletList.scss'; | ||
|
||
const WalletList: React.FC = () => { | ||
const { data } = useWalletAccountsList(); | ||
|
||
if (!data.length) return <h1>No wallets found</h1>; | ||
|
||
return ( | ||
<div className='account-list'> | ||
{data?.map(account => { | ||
return ( | ||
<div className='account-item' key={account.loginid}> | ||
<div className='currency'>{account.currency}</div> | ||
<br /> | ||
<div className='account-category'>{account.landing_company_name}</div> | ||
<br /> | ||
<div className='balance'>{account.balance}</div> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; | ||
|
||
export default WalletList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import WalletList from './WalletList'; | ||
import './WalletList.scss'; | ||
|
||
export default WalletList; |