profile refactor

This commit is contained in:
2026-06-29 18:20:13 +03:00
parent d247e41d25
commit f372ef6fb5
6 changed files with 28 additions and 44 deletions

View File

@@ -41,17 +41,6 @@
/* Mobile-only section selector — hidden on desktop. */
.select {
display: none;
width: 100%;
height: 44px;
padding: 0 14px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.12);
background: var(--bg-deep);
color: var(--text-primary);
font-size: 15px;
font-weight: 600;
font-family: inherit;
cursor: pointer;
}
/* < 1024px: replace the list with the select. */

View File

@@ -1,5 +1,6 @@
import { NavLink, useLocation, useNavigate } from 'react-router-dom'
import { ROUTES } from '@shared/config/routes'
import { Select } from '@shared/ui'
import { ProfileSummary } from './ProfileSummary'
import styles from './ProfileMenu.module.css'
@@ -10,6 +11,8 @@ const ITEMS = [
{ to: ROUTES.PROFILE_MNEMONIC, label: 'Мнемоническая фраза' },
]
const SELECT_OPTIONS = ITEMS.map(({ to, label }) => ({ value: to, label }))
// Left column of the profile dashboard: pinned profile summary on top, then
// the section navigation. On desktop the navigation is a vertical list; on
// mobile it collapses into a <select> so only the chosen section is shown.
@@ -24,18 +27,14 @@ export function ProfileMenu() {
<ProfileSummary />
</div>
<select
className={styles.select}
value={current}
onChange={(e) => navigate(e.target.value)}
aria-label="Раздел профиля"
>
{ITEMS.map(({ to, label }) => (
<option key={to} value={to}>
{label}
</option>
))}
</select>
<div className={styles.select}>
<Select
value={current}
options={SELECT_OPTIONS}
onChange={(value) => navigate(value)}
label="Раздел профиля"
/>
</div>
<nav className={styles.nav}>
{ITEMS.map(({ to, label }) => (

View File

@@ -182,8 +182,4 @@
border-top: 1px solid rgba(255, 255, 255, 0.06);
margin-top: 4px;
}
.summaryDate {
display: none;
}
}