refactor publish event

This commit is contained in:
reya
2023-11-14 15:15:13 +07:00
parent fee4ad7b98
commit dc5b4f8ac1
22 changed files with 143 additions and 191 deletions
+1
View File
@@ -20,6 +20,7 @@ export function useProfile(pubkey: string, embed?: string) {
const cleanPubkey = pubkey.replace(/[^a-zA-Z0-9]/g, '');
const user = ndk.getUser({ pubkey: cleanPubkey });
if (!user) return Promise.reject(new Error("user's profile not found"));
return await user.fetchProfile();
},
staleTime: Infinity,