profile refactor

This commit is contained in:
2026-06-29 18:13:56 +03:00
parent 237112c302
commit d247e41d25
12 changed files with 272 additions and 200 deletions

View File

@@ -6,9 +6,11 @@ import styles from './SeedPhraseWidget.module.css'
interface Props {
words: string[]
/** Show the "Перейти в профиль" link. Hidden when embedded inside the profile. */
showProfileLink?: boolean
}
export function SeedPhraseWidget({ words }: Props) {
export function SeedPhraseWidget({ words, showProfileLink = true }: Props) {
const { hidden, countdown, copied, handleHide, handleCopy } = useSeedPhrase(words)
return (
@@ -54,11 +56,13 @@ export function SeedPhraseWidget({ words }: Props) {
</p>
</div>
<div className={styles.profileLinkRow}>
<Link to={ROUTES.PROFILE} className={styles.profileLink}>
Перейти в профиль
</Link>
</div>
{showProfileLink && (
<div className={styles.profileLinkRow}>
<Link to={ROUTES.PROFILE} className={styles.profileLink}>
Перейти в профиль
</Link>
</div>
)}
</div>
)
}