22 lines
599 B
Svelte
22 lines
599 B
Svelte
<script lang="ts">
|
|
import type {ProfilePointer} from "@welshman/content"
|
|
import Button from "@lib/components/Button.svelte"
|
|
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
|
import {pushModal} from "@app/modal"
|
|
import {profiles} from "@app/core"
|
|
|
|
type Props = {
|
|
value: ProfilePointer
|
|
url?: string
|
|
}
|
|
|
|
const {value, url}: Props = $props()
|
|
|
|
const display = $profiles.display(value.pubkey).$
|
|
|
|
const openProfile = () => pushModal(ProfileDetail, {pubkey: value.pubkey, url})
|
|
</script>
|
|
|
|
<Button onclick={openProfile} class="link-content">
|
|
@{$display}
|
|
</Button>
|