summaryrefslogtreecommitdiff
path: root/gui/src/components/feed/PostList.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/components/feed/PostList.tsx')
-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}
/>