Add profile info caching

This commit is contained in:
Paul Frazee 2022-11-14 16:56:59 -06:00
parent 723dee5704
commit 6e93301542
3 changed files with 47 additions and 2 deletions

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)