diff options
Diffstat (limited to 'gui/src/components/feed/PostList.tsx')
| -rw-r--r-- | gui/src/components/feed/PostList.tsx | 17 |
1 files changed, 14 insertions, 3 deletions
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} + /> + ); + })} </> ); } |
