From 206b528075bee1ada192fc1ff7709986c2c9af10 Mon Sep 17 00:00:00 2001
From: Ategon <benjamin@barbeau.net>
Date: Tue, 14 Jan 2025 17:49:10 -0500
Subject: [PATCH] Remove unused code

---
 src/components/posts/PostCard.tsx | 71 ++++++++++++++++---------------
 src/components/posts/index.tsx    | 41 +++++++++---------
 2 files changed, 57 insertions(+), 55 deletions(-)

diff --git a/src/components/posts/PostCard.tsx b/src/components/posts/PostCard.tsx
index 88f6565..cd6a26e 100644
--- a/src/components/posts/PostCard.tsx
+++ b/src/components/posts/PostCard.tsx
@@ -1,40 +1,41 @@
-import { Button, Card, CardBody, Chip, User } from "@nextui-org/react";
-import { Heart } from "lucide-react";
-import { formatDistance } from "date-fns";
-import Link from "next/link";
+// import { Button, Card, CardBody, Chip, User } from "@nextui-org/react";
+// import { Heart } from "lucide-react";
+// import { formatDistance } from "date-fns";
+// import Link from "next/link";
 
-export default function PostCard({ post }) {
-  return (
-    <Card>
-      <CardBody>
-        <p className="text-xl">{post.title}</p>
+export default function PostCard() {
+  //   return (
+  //     <Card>
+  //       <CardBody>
+  //         <p className="text-xl">{post.title}</p>
 
-        {post.flairs &&
-          Object.values(post.flairs).map((flair) => (
-            <div key={flair.id}>
-              <Chip>{flair.name}</Chip>
-            </div>
-          ))}
+  //         {post.flairs &&
+  //           Object.values(post.flairs).map((flair) => (
+  //             <div key={flair.id}>
+  //               <Chip>{flair.name}</Chip>
+  //             </div>
+  //           ))}
 
-        <div className="flex items-center gap-3">
-          <p>By</p>
-          <Link href={`/u/${post.author.slug}`}>
-            <User name={post.author.name} />
-          </Link>
-          <p>
-            {formatDistance(new Date(post.createdAt), new Date(), {
-              addSuffix: true,
-            })}
-          </p>
-        </div>
+  //         <div className="flex items-center gap-3">
+  //           <p>By</p>
+  //           <Link href={`/u/${post.author.slug}`}>
+  //             <User name={post.author.name} />
+  //           </Link>
+  //           <p>
+  //             {formatDistance(new Date(post.createdAt), new Date(), {
+  //               addSuffix: true,
+  //             })}
+  //           </p>
+  //         </div>
 
-        <p>{post.content}</p>
-        <div className="flex justify-between">
-          <Button>
-            <Heart /> {post.likers.length}
-          </Button>
-        </div>
-      </CardBody>
-    </Card>
-  );
+  //         <p>{post.content}</p>
+  //         <div className="flex justify-between">
+  //           <Button>
+  //             <Heart /> {post.likers.length}
+  //           </Button>
+  //         </div>
+  //       </CardBody>
+  //     </Card>
+  //   );
+  return <div></div>;
 }
diff --git a/src/components/posts/index.tsx b/src/components/posts/index.tsx
index 4d5f121..bff5596 100644
--- a/src/components/posts/index.tsx
+++ b/src/components/posts/index.tsx
@@ -1,28 +1,29 @@
 "use client";
 
-import { useEffect, useState } from "react";
-import PostCard from "./PostCard";
+// import { useEffect, useState } from "react";
+// import PostCard from "./PostCard";
 
 export default function Posts() {
-  const [posts, setPosts] = useState();
+  // const [posts, setPosts] = useState();
 
-  useEffect(() => {
-    const fetchPosts = async () => {
-      const response = await fetch("http://localhost:3005/api/v1/posts");
-      setPosts(await response.json());
-    };
+  // useEffect(() => {
+  //   const fetchPosts = async () => {
+  //     const response = await fetch("http://localhost:3005/api/v1/posts");
+  //     setPosts(await response.json());
+  //   };
 
-    fetchPosts();
-  }, []);
+  //   fetchPosts();
+  // }, []);
 
-  return (
-    <div className="flex flex-col gap-3 p-4">
-      {posts &&
-        posts.map((post) => (
-          <div key={post.key}>
-            <PostCard post={post} />
-          </div>
-        ))}
-    </div>
-  );
+  // return (
+  //   <div className="flex flex-col gap-3 p-4">
+  //     {posts &&
+  //       posts.map((post) => (
+  //         <div key={post.key}>
+  //           <PostCard post={post} />
+  //         </div>
+  //       ))}
+  //   </div>
+  // );
+  return <div></div>;
 }