From 74d84cb2f22600b6246343e9ea606cf0db7517f0 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 19 Nov 2025 05:47:30 +0700 Subject: Big GUI improvements on Nostr rendering and fetching --- gui/src/components/feed/PostList.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 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 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 ( -- cgit v1.2.3