19.05.2026 okkk

This commit is contained in:
2026-05-19 14:38:35 +03:00
parent 2a48d4a4c5
commit 22ceb8e2b4
2 changed files with 17 additions and 3 deletions

View File

@@ -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>

View File

@@ -76,7 +76,11 @@ export function WalletHeader() {
</div>
<div className={styles.accountWrapper} ref={ref}>
<button className={styles.account} onClick={() => setOpen(v => !v)}>
<div className={styles.avatar} />
{me?.avatar_link ? (
<img src={me.avatar_link} alt="" className={styles.avatar} />
) : (
<div className={styles.avatar} />
)}
<span>{fullName || 'Test account'}</span>
</button>
{open && (