mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-06-08 21:59:20 +02:00
replace all nostr-react useProfile with NDK useProfileValue
This commit is contained in:
@@ -5,12 +5,11 @@ import {
|
||||
nip19,
|
||||
} from "nostr-tools";
|
||||
import Link from "next/link";
|
||||
import { useProfileValue } from "@nostr-dev-kit/ndk-hooks";
|
||||
|
||||
export function RecentFollower({ follower }: { follower: any }) {
|
||||
|
||||
const { data: userData, isLoading: userDataLoading } = useProfile({
|
||||
pubkey: follower.pubkey,
|
||||
});
|
||||
const userData = useProfileValue(follower.pubkey);
|
||||
|
||||
let encoded = nip19.npubEncode(follower.pubkey);
|
||||
let parts = encoded.split('npub');
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
nip19,
|
||||
} from "nostr-tools";
|
||||
import Link from "next/link";
|
||||
import { useProfileValue } from "@nostr-dev-kit/ndk-hooks";
|
||||
|
||||
export function RecentZap({ zap }: { zap: any }) {
|
||||
|
||||
@@ -15,9 +16,7 @@ export function RecentZap({ zap }: { zap: any }) {
|
||||
}
|
||||
}
|
||||
|
||||
const { data: userData, isLoading: userDataLoading } = useProfile({
|
||||
pubkey: zapperPubkey,
|
||||
});
|
||||
const userData = useProfileValue(zapperPubkey);
|
||||
|
||||
console.log('zap', zap)
|
||||
|
||||
|
||||
@@ -10,15 +10,14 @@ import {
|
||||
nip19,
|
||||
} from "nostr-tools";
|
||||
import { RecentZapsCard } from './RecentZapsCard';
|
||||
import { useProfileValue } from '@nostr-dev-kit/ndk-hooks';
|
||||
|
||||
interface ProfileInfoCardProps {
|
||||
pubkey: string;
|
||||
}
|
||||
|
||||
const ProfileInfoCard: React.FC<ProfileInfoCardProps> = ({ pubkey }) => {
|
||||
const { data: userData, isLoading: userDataLoading } = useProfile({
|
||||
pubkey,
|
||||
});
|
||||
const userData = useProfileValue(pubkey);
|
||||
|
||||
const { events: followers, isLoading: followersLoading } = useNostrEvents({
|
||||
filter: {
|
||||
|
||||
Reference in New Issue
Block a user