mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Allow following yourself in you are not already
This commit is contained in:
parent
18f95a5e83
commit
5d08eeb097
@ -47,7 +47,7 @@ const PeopleList: Component<{ people: PrimalUser[], label: string, id?: string }
|
|||||||
{truncateNpub(person?.npub)}
|
{truncateNpub(person?.npub)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Show when={account?.publicKey !== person.pubkey}>
|
<Show when={account?.publicKey !== person.pubkey || !account?.following.includes(person.pubkey)}>
|
||||||
<FollowButton person={person} />
|
<FollowButton person={person} />
|
||||||
</Show>
|
</Show>
|
||||||
</A>
|
</A>
|
||||||
|
@ -75,3 +75,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.placeholderDiv {
|
||||||
|
width: 72px;
|
||||||
|
}
|
||||||
|
@ -59,7 +59,10 @@ const ProfileContact: Component<{
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={account?.publicKey !== props.profile?.pubkey}>
|
<Show
|
||||||
|
when={account?.publicKey !== props.profile?.pubkey || !account?.following.includes(props.profile?.pubkey || '')}
|
||||||
|
fallback={<div class={styles.placeholderDiv}></div>}
|
||||||
|
>
|
||||||
<FollowButton person={props.profile} postAction={props.postAction} />
|
<FollowButton person={props.profile} postAction={props.postAction} />
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
@ -603,7 +603,7 @@ const Profile: Component = () => {
|
|||||||
</ButtonSecondary>
|
</ButtonSecondary>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={account?.publicKey !== profile?.profileKey}>
|
<Show when={!isCurrentUser() || !account?.following.includes(profile?.profileKey || '')}>
|
||||||
<FollowButton person={profile?.userProfile} large={true} />
|
<FollowButton person={profile?.userProfile} large={true} />
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user