summaryrefslogtreecommitdiff
path: root/gui/src/components/feed
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-11-19 05:47:30 +0700
committerpolwex <polwex@sortug.com>2025-11-19 05:47:30 +0700
commit74d84cb2f22600b6246343e9ea606cf0db7517f0 (patch)
tree0d68285c8e74e6543645e17ab2751d543c1ff9a6 /gui/src/components/feed
parente6e657be3a3b1dae426b46f3bc16f9a5cf4861c2 (diff)
Big GUI improvements on Nostr rendering and fetchingpolwex/iris
Diffstat (limited to 'gui/src/components/feed')
-rw-r--r--gui/src/components/feed/PostList.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/gui/src/components/feed/PostList.tsx b/gui/src/components/feed/PostList.tsx
index 12b58b4..3659bde 100644
--- a/gui/src/components/feed/PostList.tsx
+++ b/gui/src/components/feed/PostList.tsx
@@ -1,6 +1,8 @@
import TrillPost from "@/components/post/Post";
import type { FC } from "@/types/trill";
import useLocalState from "@/state/state";
+import type { UserType } from "@/types/nostrill";
+import { isValidPatp } from "urbit-ob";
// import { useEffect } from "react";
// import { useQueryClient } from "@tanstack/react-query";
// import { toFull } from "../thread/helpers";
@@ -26,14 +28,21 @@ function TrillFeed({ data, refetch }: { data: FC; refetch: Function }) {
.filter((i) => !data.feed[i].parent)
.sort()
.reverse()
- .slice(0, 50)
+ // .slice(0, 50)
.map((i) => {
const poast = data.feed[i];
- const profile = profiles.get(poast.author);
+ const user: UserType = poast.event
+ ? { nostr: poast.event.pubkey }
+ : isValidPatp(poast.author)
+ ? { urbit: poast.author }
+ : { nostr: poast.author };
+ const userString = "urbit" in user ? user.urbit : user.nostr;
+ const profile = profiles.get(userString);
return (
<TrillPost
key={i}
poast={poast}
+ user={user}
profile={profile}
refetch={refetch}
/>