diff --git a/apps/social/src/app/(authentication)/login/page.tsx b/apps/social/src/app/(authentication)/login/page.tsx index ab51a3fd..a2e86b09 100644 --- a/apps/social/src/app/(authentication)/login/page.tsx +++ b/apps/social/src/app/(authentication)/login/page.tsx @@ -45,7 +45,7 @@ export default async function Login() { } return ( -
+

diff --git a/apps/social/src/app/components/feed.tsx b/apps/social/src/app/components/feed.tsx index 1a26abd0..2e08917b 100644 --- a/apps/social/src/app/components/feed.tsx +++ b/apps/social/src/app/components/feed.tsx @@ -2,6 +2,7 @@ import { PostCard } from "./post-card"; const data = [ { + id: "C-r5lAwpJUg", imageUrl: "https://lh3.googleusercontent.com/a/ACg8ocK4CtuGuDZlPy9H_DMb3EQIue9Hrd5bqYcMZOY-Xb8LcuyqsBI=s96-c", username: "umamin", @@ -15,6 +16,7 @@ const data = [ comments: 9, }, { + id: "C-r5lAwpJUg", imageUrl: "https://lh3.googleusercontent.com/a/ACg8ocJf40m8VVe3wNxhgBe11Bm7ukLSPeR0SDPPg6q8wq6NYRZtCYk=s96-c", username: "josh", @@ -32,7 +34,7 @@ const data = [ export function Feed() { return (
-
+
{data.map((props) => ( ))} diff --git a/apps/social/src/app/components/post-card.tsx b/apps/social/src/app/components/post-card.tsx index 7e837a17..97fc2ce1 100644 --- a/apps/social/src/app/components/post-card.tsx +++ b/apps/social/src/app/components/post-card.tsx @@ -9,6 +9,7 @@ import { shortTimeAgo } from "@/lib/utils"; import { BadgeCheck, Heart, MessageCircle, ScanFace } from "lucide-react"; type Props = { + id: string; imageUrl: string; username: string; displayName: string; @@ -68,7 +69,70 @@ export function PostCard(props: Props) {

- + + + + {props.comments} +
+ + + + ); +} + +export function PostCardMain(props: Props) { + return ( +
+
+ + + + + + + +
+
+ + {props.displayName} + + + {props.isVerified && ( + + )} + @{props.username} +
+ +

+ {shortTimeAgo(props.createdAt)} +

+
+
+ +
+

{props.content}

+ +
+
+ + {props.likes} +
+ +
+ + + {props.comments}
diff --git a/apps/social/src/app/layout.tsx b/apps/social/src/app/layout.tsx index 21f0181b..93fcd463 100644 --- a/apps/social/src/app/layout.tsx +++ b/apps/social/src/app/layout.tsx @@ -90,7 +90,7 @@ export default function RootLayout({ }} /> - {children} +
{children}
diff --git a/apps/social/src/app/post/[id]/page.tsx b/apps/social/src/app/post/[id]/page.tsx new file mode 100644 index 00000000..c16e7cf2 --- /dev/null +++ b/apps/social/src/app/post/[id]/page.tsx @@ -0,0 +1,95 @@ +import { PostCard, PostCardMain } from "../../components/post-card"; + +const postData = { + id: "C-r5lAwpJUg", + imageUrl: + "https://lh3.googleusercontent.com/a/ACg8ocK4CtuGuDZlPy9H_DMb3EQIue9Hrd5bqYcMZOY-Xb8LcuyqsBI=s96-c", + username: "umamin", + displayName: "Umamin Official", + createdAt: 1718604131, + content: + "An open-source social platform built exclusively for the Umamin community. Umamin v2.0 requires a new account that can be used across the platform.", + isLiked: true, + isVerified: true, + likes: 24, + comments: 9, +}; + +const repliesData = [ + { + id: "C-r5lAwpJUg", + imageUrl: + "https://lh3.googleusercontent.com/a/ACg8ocKpLSOuzPnPwOYTFC88ENWUU_7ieMdwtQZ9UzkqCJaRbnpUELk=s96-c", + username: "Dale", + displayName: "Dale Hyamero", + createdAt: 1718342984, + content: + "Next generation open-source platform for sending and receiving encrypted anonymous messages. Umamin v2.0 requires a new account that can be used across the platform.", + isLiked: false, + isVerified: false, + likes: 10, + comments: 6, + }, + { + id: "C-r5lAwpJUg", + imageUrl: + "https://lh3.googleusercontent.com/a/ACg8ocJf40m8VVe3wNxhgBe11Bm7ukLSPeR0SDPPg6q8wq6NYRZtCYk=s96-c", + username: "josh", + displayName: "Josh Daniel", + createdAt: 1718342984, + content: + "We're building Umamin Social, a new platform to connect the community. Coming soon! 🚀", + isLiked: false, + isVerified: false, + likes: 7, + comments: 4, + }, + { + id: "C-r5lAwpJUg", + imageUrl: + "https://lh3.googleusercontent.com/a/ACg8ocKpLSOuzPnPwOYTFC88ENWUU_7ieMdwtQZ9UzkqCJaRbnpUELk=s96-c", + username: "Dale", + displayName: "Dale Hyamero", + createdAt: 1718342984, + content: + "Next generation open-source platform for sending and receiving encrypted anonymous messages. Umamin v2.0 requires a new account that can be used across the platform.", + isLiked: false, + isVerified: false, + likes: 10, + comments: 6, + }, + { + id: "C-r5lAwpJUg", + imageUrl: + "https://lh3.googleusercontent.com/a/ACg8ocJf40m8VVe3wNxhgBe11Bm7ukLSPeR0SDPPg6q8wq6NYRZtCYk=s96-c", + username: "josh", + displayName: "Josh Daniel", + createdAt: 1718342984, + content: + "We're building Umamin Social, a new platform to connect the community. Coming soon! 🚀", + isLiked: false, + isVerified: false, + likes: 7, + comments: 4, + }, +]; + +export default function Post() { + return ( +
+
+ + +
+ Replies +
+ +
+ {repliesData.map((reply) => { + return ; + })} +
+
+
+ ); +}