From b1d68ac307ed87d63e83820cbdf843fff0fd9f7f Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Thu, 11 Sep 2025 01:48:14 +0700
Subject: init

---
 front/src/components/feed/PostList.tsx | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 front/src/components/feed/PostList.tsx

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

diff --git a/front/src/components/feed/PostList.tsx b/front/src/components/feed/PostList.tsx
new file mode 100644
index 0000000..3d41ff8
--- /dev/null
+++ b/front/src/components/feed/PostList.tsx
@@ -0,0 +1,32 @@
+import TrillPost from "./Post";
+import type { FC } from "@/types/trill";
+// import { useEffect } from "react";
+// import { useQueryClient } from "@tanstack/react-query";
+// import { toFull } from "../thread/helpers";
+
+function TrillFeed({ data, refetch }: { data: FC; refetch: Function }) {
+  // const qc = useQueryClient();
+  // useEffect(() => {
+  //   Object.values(data.feed).forEach((poast) => {
+  //     const queryKey = ["trill-thread", poast.host, poast.id];
+  //     const existing = qc.getQueryData(queryKey);
+  //     if (!existing || !("fpost" in (existing as any))) {
+  //       qc.setQueryData(queryKey, {
+  //         fpost: toFull(poast),
+  //       });
+  //     }
+  //   });
+  // }, [data]);
+  return (
+    <>
+      {Object.keys(data.feed)
+        .sort()
+        .reverse()
+        .map((i) => (
+          <TrillPost key={i} poast={data.feed[i]} refetch={refetch} />
+        ))}
+    </>
+  );
+}
+
+export default TrillFeed;
-- 
cgit v1.2.3

