refactor user component and updated onboarding

This commit is contained in:
Ren Amamiya
2023-04-03 08:43:37 +07:00
parent 39e7c9bf34
commit 33000979ed
11 changed files with 89 additions and 129 deletions

6
src/utils/metadata.tsx Normal file
View File

@@ -0,0 +1,6 @@
import { Author } from 'nostr-relaypool';
export const fetchMetadata = (pubkey: string, pool: any, relays: any) => {
const author = new Author(pool, relays, pubkey);
return new Promise((resolve) => author.metaData(resolve, 0));
};

View File

@@ -13,7 +13,7 @@ export const followsTag = (arr) => {
const newarr = [];
// push item to tags
arr.forEach((item) => {
arr.push(['p', item]);
newarr.push(['p', item]);
});
return newarr;
};