-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I'm using useProfile() and useNostrEvents(). I have a component to render profiles. It is called for the same user multiple times. But only 1 of the components gets either a profile or an event. The other components gets an empty array for .events.
Here's what I mean in pseudocode...
export const Profile = ({id}:{id: string}) => {
const profileResult = useProfile({pubkey: id})
return <div>{JSON.parse(profileResult)}</div>
}
export const Example = () => {
<React.Fragment>
<Profile
id={"3e5dc1f1ed0ad1bd24055da9588a69d37d6eb983526c0fb12aff31199ed8f4b0"}
/>
<Profile
id={"3e5dc1f1ed0ad1bd24055da9588a69d37d6eb983526c0fb12aff31199ed8f4b0"}
/>
</React.Fragment>;
};In this example, the second component gets the profile, but the first gets undefined.
I tried swapping useProfile() for useNostrEvents() and constructing the query manually, but I get the same result.
Metadata
Metadata
Assignees
Labels
No labels