flotilla/src/app/components/ContentMention.svelte

17 lines
456 B
Svelte
Raw Normal View History

2024-09-24 21:12:38 +00:00
<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 {nostr} from '@app/state'
export let value
const profile = deriveProfile(value.pubkey)
const nprofile = nip19.nprofileEncode(value)
</script>
<Link external href={nostr(nprofile)} class="link-content">
@{displayProfile($profile)}
</Link>