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