Open profiles in drawer

This commit is contained in:
Jon Staab
2024-10-09 12:45:13 -07:00
parent 3451ed74ca
commit 6ef291d755
11 changed files with 73 additions and 56 deletions
+7 -6
View File
@@ -1,16 +1,17 @@
<script lang="ts">
import {nip19} from "nostr-tools"
import {displayProfile} from "@welshman/util"
import {deriveProfile} from "@welshman/app"
import Link from "@lib/components/Link.svelte"
import {entityLink} from "@app/state"
import Button from "@lib/components/Button.svelte"
import ProfileDetail from "@app/components/ProfileDetail.svelte"
import {pushDrawer} from "@app/modal"
export let value
const profile = deriveProfile(value.pubkey)
const nprofile = nip19.nprofileEncode(value)
const onClick = () => pushDrawer(ProfileDetail, {pubkey: value.pubkey})
</script>
<Link external href={entityLink(nprofile)} class="link-content">
<Button on:click={onClick} class="link-content">
@{displayProfile($profile)}
</Link>
</Button>