added mention note

This commit is contained in:
Ren Amamiya
2023-03-23 09:38:16 +07:00
parent 29c7075f22
commit 3c08cf2ef9
5 changed files with 115 additions and 9 deletions

View File

@@ -24,6 +24,7 @@ export const UserExtend = memo(function UserExtend({ pubkey, time }: { pubkey: s
};
const fetchProfile = useCallback(async (id: string) => {
console.log('fetch');
const res = await fetch(`https://rbr.bio/${id}/metadata.json`, {
method: 'GET',
timeout: 30,

View File

@@ -46,5 +46,5 @@ export const UserMention = memo(function UserMention({ pubkey }: { pubkey: strin
.catch(console.error);
}, [fetchProfile, getCacheProfile, insertCacheProfile, pubkey]);
return <span className="text-fuchsia-500">@{profile?.name || truncate(pubkey, 16, ' .... ')}</span>;
return <span className="cursor-pointer text-fuchsia-500">@{profile?.name || truncate(pubkey, 16, ' .... ')}</span>;
});