Discovering more content...
import React, { useState, useEffect, useRef } from 'react'; import { Heart, MessageCircle, Share2, MoreHorizontal, Image as ImageIcon, Video, Smile, Home, Users, PlaySquare, Bell, Search, Plus, Bookmark, User, Settings, LogOut, ChevronDown } from 'lucide-react'; // --- Mock Data --- const INITIAL_POSTS = [ { id: 1, user: { name: "Elena Rodriguez", avatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=150", handle: "@elena_r" }, content: "Golden hour in the city! ✨", media: { type: "image", url: "https://images.unsplash.com/photo-1517841905240-472988babdf9?w=800" }, likes: 1240, comments: 42, timestamp: "2h ago" }, { id: 2, user: { name: "Sophia Chen", avatar: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=150", handle: "@sophia_c" }, content: "Check out this beautiful landscape from my weekend trip.", media: { type: "video", url: "https://assets.mixkit.co/videos/preview/mixkit-girl-in-neon-light-1282-large.mp4", poster: "https://images.unsplash.com/photo-1550684848-fac1c5b4e853?w=800" }, likes: 856, comments: 18, timestamp: "5h ago" } ]; const SUGGESTIONS = [ { id: 1, name: "Chloe Miller", avatar: "https://images.unsplash.com/photo-1524504527035-231b0ca210a6?w=100" }, { id: 2, name: "Isabella Silva", avatar: "https://images.unsplash.com/photo-1517841905240-472988babdf9?w=100" }, { id: 3, name: "Mia Johnson", avatar: "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=100" } ]; // --- Components --- const SidebarLink = ({ icon: Icon, label, active = false }) => ( ); const PostCard = ({ post }) => { const [liked, setLiked] = useState(false); const [likesCount, setLikesCount] = useState(post.likes); const toggleLike = () => { setLiked(!liked); setLikesCount(prev => liked ? prev - 1 : prev + 1); }; return (
{post.timestamp}
{post.content}
{likesCount.toLocaleString()} likes
Discovering more content...