19.05.2026 okkk
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useMe } from '@features/auth'
|
||||
import { usePortfolio } from '@features/wallet'
|
||||
import { usePortfolio, useWalletAddresses } from '@features/wallet'
|
||||
import { ROUTES } from '@shared/config/routes'
|
||||
import { Button, FormField } from '@shared/ui'
|
||||
import { WalletHeader } from '@widgets/wallet-header'
|
||||
@@ -10,6 +10,7 @@ import styles from './ProfilePage.module.css'
|
||||
export function ProfilePage() {
|
||||
const { data } = useMe()
|
||||
const { data: portfolio, isLoading: isPortfolioLoading } = usePortfolio()
|
||||
const { data: walletAddresses } = useWalletAddresses()
|
||||
const navigate = useNavigate()
|
||||
|
||||
const capitalize = (s: string) => (s ? s[0].toUpperCase() + s.slice(1).toLowerCase() : '')
|
||||
@@ -67,7 +68,16 @@ export function ProfilePage() {
|
||||
}
|
||||
>
|
||||
<div className={styles.grid1}>
|
||||
<FormField label="Адрес ERC-20" readOnly icon="lock" value={data?.erc20 ?? ''} placeholder="0x0000000000000000000000000000000000000000" />
|
||||
{walletAddresses?.map(({ chain, address }) => (
|
||||
<FormField
|
||||
key={chain}
|
||||
label={`Адрес ${chain}`}
|
||||
readOnly
|
||||
icon="lock"
|
||||
value={address}
|
||||
placeholder="—"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</ProfileSection>
|
||||
|
||||
|
||||
@@ -76,7 +76,11 @@ export function WalletHeader() {
|
||||
</div>
|
||||
<div className={styles.accountWrapper} ref={ref}>
|
||||
<button className={styles.account} onClick={() => setOpen(v => !v)}>
|
||||
{me?.avatar_link ? (
|
||||
<img src={me.avatar_link} alt="" className={styles.avatar} />
|
||||
) : (
|
||||
<div className={styles.avatar} />
|
||||
)}
|
||||
<span>{fullName || 'Test account'}</span>
|
||||
</button>
|
||||
{open && (
|
||||
|
||||
Reference in New Issue
Block a user