-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6153252
commit c1c1b96
Showing
8 changed files
with
353 additions
and
80 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,18 @@ | ||
import { useActiveAccount } from '@/hooks/api/account'; | ||
import { CurrencyUsdIcon } from '@deriv/quill-icons'; | ||
import { AccountSwitcher as UIAccountSwitcher } from '@deriv-com/ui'; | ||
import { FormatUtils } from '@deriv-com/utils'; | ||
|
||
export const AccountSwitcher = () => { | ||
const { data } = useActiveAccount(); | ||
const activeAccount = { | ||
balance: FormatUtils.formatMoney(data?.balance ?? 0), | ||
currency: data?.currency || 'USD', | ||
currencyLabel: data?.currency || 'US Dollar', | ||
icon: <CurrencyUsdIcon iconSize='sm' />, | ||
isActive: true, | ||
isVirtual: Boolean(data?.is_virtual), | ||
loginid: data?.loginid || '', | ||
}; | ||
return data && <UIAccountSwitcher activeAccount={activeAccount} isDisabled />; | ||
}; |
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
Oops, something went wrong.