Mirrored from https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 06:00 UTC
fix/restore-static-site
| 1 | import React from 'react'; |
| 2 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; |
| 3 | import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; |
| 4 | import { MessageSquare, ThumbsUp, Share2 } from "lucide-react"; |
| 5 | |
| 6 | export const CommunityFeed = () => { |
| 7 | const posts = [ |
| 8 | { |
| 9 | id: 1, |
| 10 | author: "Mentor Sarah", |
| 11 | content: "Just uploaded new learning materials for the 'React Hooks' lesson in StudyBuddy. Check it out!", |
| 12 | time: "2h ago", |
| 13 | likes: 12, |
| 14 | }, |
| 15 | { |
| 16 | id: 2, |
| 17 | author: "Member Kevin", |
| 18 | content: "I just built my first portfolio website using the Website Builder! Thanks Community Buddy!", |
| 19 | time: "5h ago", |
| 20 | likes: 24, |
| 21 | }, |
| 22 | ]; |
| 23 | |
| 24 | return ( |
| 25 | <Card> |
| 26 | <CardHeader> |
| 27 | <CardTitle className="text-lg">Community Feed</CardTitle> |
| 28 | </CardHeader> |
| 29 | <CardContent className="space-y-6"> |
| 30 | {posts.map((post) => ( |
| 31 | <div key={post.id} className="space-y-3 pb-4 border-b last:border-0 border-border"> |
| 32 | <div className="flex items-center gap-3"> |
| 33 | <Avatar className="h-8 w-8"> |
| 34 | <AvatarFallback>{post.author[0]}</AvatarFallback> |
| 35 | </Avatar> |
| 36 | <div> |
| 37 | <p className="text-sm font-bold">{post.author}</p> |
| 38 | <p className="text-[10px] text-muted-foreground">{post.time}</p> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p className="text-sm text-foreground/90">{post.content}</p> |
| 42 | <div className="flex gap-4 text-muted-foreground"> |
| 43 | <button className="flex items-center gap-1 text-xs hover:text-primary"><ThumbsUp size={14} /> {post.likes}</button> |
| 44 | <button className="flex items-center gap-1 text-xs hover:text-primary"><MessageSquare size={14} /> Comment</button> |
| 45 | <button className="flex items-center gap-1 text-xs hover:text-primary"><Share2 size={14} /> Share</button> |
| 46 | </div> |
| 47 | </div> |
| 48 | ))} |
| 49 | </CardContent> |
| 50 | </Card> |
| 51 | ); |
| 52 | }; |