profile refactor
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user