Add profile info caching

This commit is contained in:
Paul Frazee
2022-11-14 16:56:59 -06:00
parent 957f42698e
commit f2bf75e85e
3 changed files with 47 additions and 2 deletions
+1 -2
View File
@@ -33,8 +33,7 @@ export function UserInfoText({
useEffect(() => {
let aborted = false
// TODO use caching to reduce loads
store.api.app.bsky.actor.getProfile({actor: did}).then(
store.profiles.getProfile(did).then(
v => {
if (aborted) return
setProfile(v.data)