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
+10 -5
View File
@@ -1,12 +1,17 @@
<script lang="ts">
import {deriveProfile} from "@welshman/app"
import Content from "@app/components/Content.svelte"
import {deriveAlias} from "@app/state"
const {pubkey} = $props()
export type Props = {
pubkey: string
url?: string
}
const profile = deriveProfile(pubkey)
const {pubkey, url}: Props = $props()
const alias = deriveAlias(pubkey, url)
</script>
{#if $profile}
<Content event={{content: $profile.about, tags: []}} />
{#if $alias?.profile}
<Content event={{content: $alias.profile.about, tags: []}} hideMediaAtDepth={0} />
{/if}