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" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
||||||
<script type="module" crossorigin src="/assets/index-19UfAL9p.js"></script>
|
<script type="module" crossorigin src="/assets/index-Cyy52NAv.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DsuaJlzX.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CsmeBXqB.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -41,17 +41,6 @@
|
|||||||
/* Mobile-only section selector — hidden on desktop. */
|
/* Mobile-only section selector — hidden on desktop. */
|
||||||
.select {
|
.select {
|
||||||
display: none;
|
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. */
|
/* < 1024px: replace the list with the select. */
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { NavLink, useLocation, useNavigate } from 'react-router-dom'
|
import { NavLink, useLocation, useNavigate } from 'react-router-dom'
|
||||||
import { ROUTES } from '@shared/config/routes'
|
import { ROUTES } from '@shared/config/routes'
|
||||||
|
import { Select } from '@shared/ui'
|
||||||
import { ProfileSummary } from './ProfileSummary'
|
import { ProfileSummary } from './ProfileSummary'
|
||||||
import styles from './ProfileMenu.module.css'
|
import styles from './ProfileMenu.module.css'
|
||||||
|
|
||||||
@@ -10,6 +11,8 @@ const ITEMS = [
|
|||||||
{ to: ROUTES.PROFILE_MNEMONIC, label: 'Мнемоническая фраза' },
|
{ 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
|
// Left column of the profile dashboard: pinned profile summary on top, then
|
||||||
// the section navigation. On desktop the navigation is a vertical list; on
|
// 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.
|
// mobile it collapses into a <select> so only the chosen section is shown.
|
||||||
@@ -24,18 +27,14 @@ export function ProfileMenu() {
|
|||||||
<ProfileSummary />
|
<ProfileSummary />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select
|
<div className={styles.select}>
|
||||||
className={styles.select}
|
<Select
|
||||||
value={current}
|
value={current}
|
||||||
onChange={(e) => navigate(e.target.value)}
|
options={SELECT_OPTIONS}
|
||||||
aria-label="Раздел профиля"
|
onChange={(value) => navigate(value)}
|
||||||
>
|
label="Раздел профиля"
|
||||||
{ITEMS.map(({ to, label }) => (
|
/>
|
||||||
<option key={to} value={to}>
|
</div>
|
||||||
{label}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<nav className={styles.nav}>
|
<nav className={styles.nav}>
|
||||||
{ITEMS.map(({ to, label }) => (
|
{ITEMS.map(({ to, label }) => (
|
||||||
|
|||||||
@@ -182,8 +182,4 @@
|
|||||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summaryDate {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user