mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 00:10:52 +00:00
Fix user display on menu
This commit is contained in:
parent
2f869bc143
commit
8d76bb1808
@ -19,7 +19,7 @@
|
||||
hasNewMessages,
|
||||
hasNewNotifications,
|
||||
sessions,
|
||||
displayProfileByPubkey,
|
||||
userDisplay,
|
||||
publishes,
|
||||
} from "src/engine"
|
||||
|
||||
@ -220,7 +220,7 @@
|
||||
<Anchor class="flex items-center gap-2" on:click={() => setSubMenu("account")}>
|
||||
<PersonCircle class="h-10 w-10" pubkey={$pubkey} />
|
||||
<div class="flex min-w-0 flex-col">
|
||||
<span>@{displayProfileByPubkey($pubkey)}</span>
|
||||
<span>@{$userDisplay}</span>
|
||||
<PersonHandle class="text-sm" pubkey={$pubkey} />
|
||||
</div>
|
||||
</Anchor>
|
||||
|
@ -103,7 +103,6 @@
|
||||
{:else if !isEllipsis(parsed)}
|
||||
{renderParsed(parsed)}
|
||||
{/if}
|
||||
{" "}
|
||||
{/each}
|
||||
</div>
|
||||
{#if showMedia && extraLinks.length > 0}
|
||||
|
@ -331,6 +331,11 @@ export const displayProfileByPubkey = (pk: string) => {
|
||||
export const deriveProfileDisplay = (pk: string) =>
|
||||
derived(deriveProfile(pk), () => displayProfileByPubkey(pk))
|
||||
|
||||
export const userDisplay = derived(
|
||||
[pubkey, profilesByPubkey],
|
||||
([$pk, $p]) => $pk ? displayProfileByPubkey($pk) : ""
|
||||
)
|
||||
|
||||
export const profilesWithName = derived(profiles, $profiles => $profiles.filter(profileHasName))
|
||||
|
||||
export class ProfileSearch extends SearchHelper<PublishedProfile, string> {
|
||||
|
Loading…
Reference in New Issue
Block a user