diff --git a/app/(app)/list/[naddr]/_components/ProfileInfo.tsx b/app/(app)/list/[naddr]/_components/ProfileInfo.tsx
new file mode 100644
index 0000000..8595e7d
--- /dev/null
+++ b/app/(app)/list/[naddr]/_components/ProfileInfo.tsx
@@ -0,0 +1,44 @@
+import Link from "next/link";
+import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
+import useProfile from "@/lib/hooks/useProfile";
+import { nip19 } from "nostr-tools";
+import { getTwoLetters, getNameToShow } from "@/lib/utils";
+import { Skeleton } from "@/components/ui/skeleton";
+import { HiMiniChevronRight, HiCheckBadge } from "react-icons/hi2";
+
+type ProfileInfoProps = {
+ pubkey: string;
+};
+export default function ProfileInfo({ pubkey }: ProfileInfoProps) {
+ const { profile } = useProfile(pubkey);
+ const npub = nip19.npubEncode(pubkey);
+ return (
+
+
+
+
+ {getTwoLetters({ npub, profile })}
+
+
+
+ {getNameToShow({ npub, profile })}
+ {!!profile?.nip05 && }
+
+
+
+ );
+}
+
+export function LoadingProfileInfo() {
+ return (
+
+ );
+}
diff --git a/app/(app)/list/[naddr]/page.tsx b/app/(app)/list/[naddr]/page.tsx
index 57a4503..95bb3a4 100644
--- a/app/(app)/list/[naddr]/page.tsx
+++ b/app/(app)/list/[naddr]/page.tsx
@@ -10,7 +10,9 @@ import { getTwoLetters, truncateText } from "@/lib/utils";
import { nip19 } from "nostr-tools";
import useEvents from "@/lib/hooks/useEvents";
import Spinner from "@/components/spinner";
-import { getTagValues } from "@/lib/nostr/utils";
+import { getTagValues, getTagsValues } from "@/lib/nostr/utils";
+import ProfileInfo from "./_components/ProfileInfo";
+import Feed from "@/containers/Feed";
const demo = [
{
@@ -51,11 +53,13 @@ export default function ListPage({
if (!event) {
return (
-
+
);
}
+ const noteIds = getTagsValues("e", event.tags).filter(Boolean);
+
const title =
getTagValues("title", event.tags) ??
getTagValues("name", event.tags) ??
@@ -63,100 +67,55 @@ export default function ListPage({
const image =
getTagValues("image", event.tags) ??
getTagValues("picture", event.tags) ??
- getTagValues("benner", event.tags);
+ getTagValues("banner", event.tags) ??
+ profile?.banner;
const description = getTagValues("description", event.tags);
return (
-
-
-
-
-
-
- {!!profile?.banner && (
-
- )}
-
-
-
-
-
- {profile?.image ? (
+
+
+
+
+ {!!image && (
- ) : (
-
)}
-
-
-
-
-
- {title}
-
- {!!profile?.nip05 && (
-
- )}
+
+
-
- {!!profile?.name &&
{profile.name}
}
- {!!profile?.name && !!profile.nip05 && (
- <>
-
ยท
-
{profile.nip05}
- >
- )}
-
-
+
+
{!!description && (
-
+
{description}
)}
-
-
- {demo.map((e) => (
-
- ))}
-
-
-
setActiveTab(t.name)}
+
diff --git a/components/KindCard/components/ProfileHeader.tsx b/components/KindCard/components/ProfileHeader.tsx
index eccbb17..20f016a 100644
--- a/components/KindCard/components/ProfileHeader.tsx
+++ b/components/KindCard/components/ProfileHeader.tsx
@@ -1,4 +1,4 @@
-import { Avatar, AvatarImage, AvatarFallback } from "@radix-ui/react-avatar";
+import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
import { HiCheckBadge } from "react-icons/hi2";
import Link from "next/link";
import useProfile from "@/lib/hooks/useProfile";