profile refactor
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
||||
<script type="module" crossorigin src="/assets/index-19UfAL9p.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DsuaJlzX.css">
|
||||
<script type="module" crossorigin src="/assets/index-Cyy52NAv.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CsmeBXqB.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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}
|
||||
<div className={styles.select}>
|
||||
<Select
|
||||
value={current}
|
||||
onChange={(e) => navigate(e.target.value)}
|
||||
aria-label="Раздел профиля"
|
||||
>
|
||||
{ITEMS.map(({ to, label }) => (
|
||||
<option key={to} value={to}>
|
||||
{label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
options={SELECT_OPTIONS}
|
||||
onChange={(value) => navigate(value)}
|
||||
label="Раздел профиля"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<nav className={styles.nav}>
|
||||
{ITEMS.map(({ to, label }) => (
|
||||
|
||||
@@ -182,8 +182,4 @@
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.summaryDate {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user