update user component

This commit is contained in:
2023-10-28 08:29:38 +07:00
parent 60b803f419
commit 6685d9af38
2 changed files with 103 additions and 39 deletions

View File

@@ -17,8 +17,9 @@ export function useProfile(pubkey: string, embed?: string) {
return profile;
}
const cleanPubkey = pubkey.replace('-', '');
const cleanPubkey = pubkey.replace(/[^a-zA-Z0-9]/g, '');
const user = ndk.getUser({ hexpubkey: cleanPubkey });
return await user.fetchProfile();
},
enabled: !!ndk,