Accounts component

This commit is contained in:
Ariadna 2025-04-20 02:02:47 -04:00
parent 8bf166f134
commit fe96164f4e
Signed by: ari
SSH key fingerprint: SHA256:j4xpQafvRcIH4rwZqM5aREIogWsCjyYohia7vH0+uZY
4 changed files with 85 additions and 21 deletions

View file

@ -0,0 +1,27 @@
<script lang="ts">
import type { AccountMetadata } from "./pdsfetch";
const { account }: { account: AccountMetadata } = $props();
</script>
<div id="accountContainer">
{#if account.avatarCid}
<img
id="avatar"
alt="avatar of {account.displayName}"
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={account.did}&cid={account.avatarCid}"
/>
{/if}
<p>{account.displayName}</p>
</div>
<style>
#accountContainer {
display: column;
text-align: start;
border: 2px solid black;
padding: 4%;
}
#avatar {
width: 50px;
height: 50px;
border-radius: 50%;
}
</style>