feat: похуйу

This commit is contained in:
2026-05-12 22:18:45 +03:00
parent 929d455b30
commit a43c75a3df
5 changed files with 50 additions and 20 deletions

View File

@@ -1,16 +1,15 @@
import { useEffect } from 'react'
import { getMe } from '@features/auth'
import { useMe } from '@features/auth'
import { Button, FormField } from '@shared/ui'
import { WalletHeader } from '@widgets/wallet-header'
import { ProfileAvatar, ProfileSection } from '@widgets/profile'
import styles from './ProfilePage.module.css'
export function ProfilePage() {
useEffect(() => {
getMe()
.then((data) => console.log('[/me]', data))
.catch((err) => console.error('[/me] error:', err))
}, [])
const { data } = useMe()
const fullName = data
? [data.last_name, data.first_name, data.middle_name].filter(Boolean).join(' ')
: ''
return (
<div className={styles.page}>
@@ -19,7 +18,7 @@ export function ProfilePage() {
<div className={styles.profileTop}>
<ProfileAvatar />
<div className={styles.userInfo}>
<span className={styles.userName}>Иванов Иван Иванович</span>
<span className={styles.userName}>{fullName}</span>
<span className={styles.userBalance}>$245.00</span>
<span className={styles.userBalanceRub}> 22 340,50 </span>
</div>
@@ -28,17 +27,17 @@ export function ProfilePage() {
<div className={styles.sections}>
<ProfileSection title="Личные данные">
<div className={styles.grid2}>
<FormField label="Полное ФИО" value="Иванов Иван Иванович" placeholder="Например: Иванов Иван Иванович" />
<FormField label="Адрес электронной почты" value="ivanov@mail.ru" type="email" icon="check" placeholder="example@mail.ru" readOnly />
<FormField label="Серия и номер паспорта" value="4515 123456" placeholder="4515 123456" readOnly />
<FormField label="Номер телефона" value="+7 (999) 123-45-67" type="tel" icon="check" placeholder="+7 (999) 000-00-00" readOnly />
<FormField label="Полное ФИО" value={fullName} placeholder="Например: Иванов Иван Иванович" />
<FormField label="Адрес электронной почты" value={data?.email ?? ''} type="email" icon="check" placeholder="example@mail.ru" readOnly />
<FormField label="Серия и номер паспорта" value={data?.passport_data ?? ''} placeholder="4515 123456" readOnly />
<FormField label="Номер телефона" value={data?.phone ?? ''} type="tel" icon="check" placeholder="+7 (999) 000-00-00" readOnly />
</div>
</ProfileSection>
<ProfileSection title="Верификация">
<div className={styles.grid2}>
<FormField label="ИНН" value="7712345678" readOnly icon="lock" placeholder="123456789012" />
<FormField label="ID аккаунта" value="ECSA-00184729" readOnly icon="lock" placeholder="ECSA-00000000" />
<FormField label="ИНН" value={data?.inn ?? ''} readOnly icon="lock" placeholder="123456789012" />
<FormField label="ID аккаунта" value={data?.id ?? ''} readOnly icon="lock" placeholder="ECSA-00000000" />
</div>
</ProfileSection>
@@ -52,7 +51,7 @@ export function ProfilePage() {
}
>
<div className={styles.grid1}>
<FormField label="Адрес ERC-20" readOnly icon="lock" value="0x1a2B3c4D5e6F7a8B9c0D1e2F3a4B5c6D7e8F9a0b" placeholder="0x0000000000000000000000000000000000000000" />
<FormField label="Адрес ERC-20" readOnly icon="lock" value={data?.erc20 ?? ''} placeholder="0x0000000000000000000000000000000000000000" />
</div>
</ProfileSection>