added useMetadata and refactor user component

This commit is contained in:
Ren Amamiya
2023-04-06 09:25:18 +07:00
parent 3c63dece46
commit 5437ec5c92
17 changed files with 161 additions and 211 deletions

View File

@@ -85,9 +85,13 @@ export default function Page() {
for (const follow of follows) {
const metadata: any = await fetchMetadata(follow, pool, relays);
createPleb({ pubkey: follow, kind: 0, metadata: metadata.content, account_id: parseInt(id) }).catch(
console.error
);
createPleb({
pleb_id: follow + '-lume' + id,
pubkey: follow,
kind: 0,
metadata: metadata.content,
account_id: parseInt(id),
}).catch(console.error);
}
// build event