feat: in-memory fallback for storing user profiles (#110)

This commit is contained in:
Alejandro
2023-01-27 22:38:41 +01:00
committed by GitHub
parent 2e3fe92b1f
commit d070185322
21 changed files with 369 additions and 123 deletions

View File

@ -3,7 +3,7 @@ import { ReactNode } from "react";
import ProfileImage from "Element/ProfileImage";
import FollowButton from "Element/FollowButton";
import useProfile from "Feed/ProfileFeed";
import { useUserProfile } from "Feed/ProfileFeed";
import { HexKey } from "Nostr";
import { useInView } from "react-intersection-observer";
@ -16,7 +16,7 @@ export interface ProfilePreviewProps {
}
export default function ProfilePreview(props: ProfilePreviewProps) {
const pubkey = props.pubkey;
const user = useProfile(pubkey)?.get(pubkey);
const user = useUserProfile(pubkey);
const { ref, inView } = useInView({ triggerOnce: true });
const options = {
about: true,
@ -34,4 +34,4 @@ export default function ProfilePreview(props: ProfilePreviewProps) {
</>}
</div>
)
}
}