Surface an owner Edit button next to Share on Lab profiles
The Edit action lived only in the sidebar Manage card; owners now get it in the profile header, right next to Share. Non-owners are unaffected (Share keeps the right alignment when there is no Edit).
This commit is contained in:
parent
122cc871ed
commit
e8d8f3a1ee
1 changed files with 12 additions and 1 deletions
|
|
@ -395,11 +395,22 @@ export default function CoachDetailPage() {
|
|||
featuredUntil={profile.featuredUntil}
|
||||
entityCoord={`${profile.event.kind}:${profile.pubkey}:${profile.identifier}`}
|
||||
/>
|
||||
{user?.pubkey === profile.pubkey && (
|
||||
<Link to={`/become/${profile.profileType}`} className="ml-auto">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className={`h-7 gap-1.5 px-2.5 ${accent.border} ${accent.text} hover:bg-white/5`}
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5" /> {t('labUi.detail.editProfile')}
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setShareOpen(true)}
|
||||
className={`ml-auto h-7 gap-1.5 px-2.5 ${accent.border} ${accent.text} hover:bg-white/5`}
|
||||
className={`h-7 gap-1.5 px-2.5 ${user?.pubkey === profile.pubkey ? '' : 'ml-auto'} ${accent.border} ${accent.text} hover:bg-white/5`}
|
||||
>
|
||||
<Share2 className="h-3.5 w-3.5" /> {t('common.share')}
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue