From 7706acaafa89691dba33c216e6287a8405c4c302 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Tue, 18 Nov 2025 08:32:45 +0700
Subject: gui fixes to nostr post rendering, added nostr-tools lib for primal
 compatibility

---
 gui/src/components/feed/PostList.tsx | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

(limited to 'gui/src/components/feed/PostList.tsx')

diff --git a/gui/src/components/feed/PostList.tsx b/gui/src/components/feed/PostList.tsx
index 0d01bd2..12b58b4 100644
--- a/gui/src/components/feed/PostList.tsx
+++ b/gui/src/components/feed/PostList.tsx
@@ -1,10 +1,12 @@
 import TrillPost from "@/components/post/Post";
 import type { FC } from "@/types/trill";
+import useLocalState from "@/state/state";
 // import { useEffect } from "react";
 // import { useQueryClient } from "@tanstack/react-query";
 // import { toFull } from "../thread/helpers";
 
 function TrillFeed({ data, refetch }: { data: FC; refetch: Function }) {
+  const { profiles } = useLocalState((s) => ({ profiles: s.profiles }));
   // const qc = useQueryClient();
   // useEffect(() => {
   //   Object.values(data.feed).forEach((poast) => {
@@ -25,9 +27,18 @@ function TrillFeed({ data, refetch }: { data: FC; refetch: Function }) {
         .sort()
         .reverse()
         .slice(0, 50)
-        .map((i) => (
-          <TrillPost key={i} poast={data.feed[i]} refetch={refetch} />
-        ))}
+        .map((i) => {
+          const poast = data.feed[i];
+          const profile = profiles.get(poast.author);
+          return (
+            <TrillPost
+              key={i}
+              poast={poast}
+              profile={profile}
+              refetch={refetch}
+            />
+          );
+        })}
     </>
   );
 }
-- 
cgit v1.2.3

