flotilla/src/app/components/ProfileLink.svelte

21 lines
575 B
Svelte
Raw Normal View History

2025-02-06 19:12:15 +00:00
<script lang="ts">
import {preventDefault} from "@lib/html"
import Button from "@lib/components/Button.svelte"
import ProfileName from "@app/components/ProfileName.svelte"
import ProfileDetail from "@app/components/ProfileDetail.svelte"
import {pushModal} from "@app/modal"
2025-04-15 18:03:27 +00:00
type Props = {
pubkey: string
url?: string
}
2025-02-06 19:12:15 +00:00
2025-04-15 18:03:27 +00:00
const {pubkey, url}: Props = $props()
const openProfile = () => pushModal(ProfileDetail, {pubkey, url})
2025-02-06 19:12:15 +00:00
</script>
<Button onclick={preventDefault(openProfile)} class="link-content">
2025-04-15 18:03:27 +00:00
@<ProfileName {pubkey} {url} />
2025-02-06 19:12:15 +00:00
</Button>