update notification

This commit is contained in:
Ren Amamiya
2023-07-23 15:54:34 +07:00
parent f0fb1bee1e
commit 13ca8a2c54
10 changed files with 116 additions and 48 deletions

View File

@@ -18,7 +18,6 @@ export function useProfile(pubkey: string, fallback?: string) {
const current = Math.floor(Date.now() / 1000);
const cache = await getUserMetadata(pubkey);
if (cache && parseInt(cache.created_at) + 86400 >= current) {
console.log('cache hit:', cache);
return JSON.parse(cache.content);
} else {
const filter: NDKFilter = { kinds: [0], authors: [pubkey] };