flotilla/src/app/components/ProfileCircle.svelte

18 lines
490 B
Svelte
Raw Normal View History

2024-10-04 00:04:00 +00:00
<script lang="ts">
2024-10-08 18:39:16 +00:00
import Avatar from "@lib/components/Avatar.svelte"
import {removeNil} from "@welshman/lib"
import {deriveProfile} from "@welshman/app"
2025-09-10 22:26:39 +00:00
import UserCircle from "@assets/icons/user-circle.svg?dataurl"
2024-10-04 00:04:00 +00:00
2025-04-15 18:03:27 +00:00
type Props = {
pubkey: string
url?: string
} & Record<string, any>
2024-10-04 00:04:00 +00:00
2025-04-15 18:03:27 +00:00
const {pubkey, url, ...props}: Props = $props()
const profile = deriveProfile(pubkey, removeNil([url]))
2024-10-04 00:04:00 +00:00
</script>
2025-09-10 22:26:39 +00:00
<Avatar src={$profile?.picture} icon={UserCircle} {...props} />