add edit profile

This commit is contained in:
Ren Amamiya
2023-06-29 10:37:35 +07:00
parent ec1ff9ab87
commit 1ba7f823cb
20 changed files with 965 additions and 184 deletions

View File

@@ -24,12 +24,10 @@ export function useProfile(id: string) {
const result = await getPleb(npub);
if (result && parseInt(result.created_at) + 86400 >= current) {
console.log("cache", result);
return result;
} else {
const user = ndk.getUser({ npub });
await user.fetchProfile();
console.log("new", user);
await createPleb(id, user.profile);
return user.profile;