Add per-url aliases

This commit is contained in:
Jon Staab
2025-04-15 11:03:27 -07:00
parent 91689e5b90
commit 374ca7f265
37 changed files with 321 additions and 162 deletions
+9 -4
View File
@@ -1,10 +1,15 @@
<script lang="ts">
import {deriveProfile} from "@welshman/app"
import Avatar from "@lib/components/Avatar.svelte"
import {deriveAlias} from "@app/state"
const {...props} = $props()
type Props = {
pubkey: string
url?: string
} & Record<string, any>
const profile = deriveProfile(props.pubkey)
const {pubkey, url, ...props}: Props = $props()
const alias = deriveAlias(pubkey, url)
</script>
<Avatar src={$profile?.picture} icon="user-circle" {...props} />
<Avatar src={$alias?.profile?.picture} icon="user-circle" {...props} />