flotilla/src/app/components/ProfileInfo.svelte

19 lines
456 B
Svelte
Raw Normal View History

2024-10-01 21:55:33 +00:00
<script lang="ts">
import {removeUndefined} from "@welshman/lib"
import {deriveProfile} from "@welshman/app"
2025-10-06 18:23:19 +00:00
import ContentMinimal from "@app/components/ContentMinimal.svelte"
2024-10-01 21:55:33 +00:00
2025-04-15 18:03:27 +00:00
export type Props = {
pubkey: string
url?: string
}
2024-10-01 21:55:33 +00:00
2025-04-15 18:03:27 +00:00
const {pubkey, url}: Props = $props()
const profile = deriveProfile(pubkey, removeUndefined([url]))
2024-10-01 21:55:33 +00:00
</script>
2025-04-15 22:45:48 +00:00
{#if $profile}
2025-10-06 18:23:19 +00:00
<ContentMinimal event={{content: $profile.about || "", tags: []}} />
2024-10-01 21:55:33 +00:00
{/if}