import React, { useState, useEffect } from 'react'; import { Heart, MessageCircle, Send, Bookmark, MoreHorizontal, Home, Search, PlusSquare, Film, User, Compass, Menu } from 'lucide-react'; // --- Mock Data --- const STORIES = [ { id: 1, username: 'your_story', avatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=150&h=150&fit=crop', isUser: true }, { id: 2, username: 'jessica_travels', avatar: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=150&h=150&fit=crop', hasStory: true }, { id: 3, username: 'photography_daily', avatar: 'https://images.unsplash.com/photo-1527980965255-d3b416303d12?w=150&h=150&fit=crop', hasStory: true }, { id: 4, username: 'design_pro', avatar: 'https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?w=150&h=150&fit=crop', hasStory: true }, { id: 5, username: 'foodie_life', avatar: 'https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?w=150&h=150&fit=crop', hasStory: true }, { id: 6, username: 'art_gallery', avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=150&h=150&fit=crop', hasStory: true }, ]; const POSTS = [ { id: 1, username: 'jessica_travels', location: 'Santorini, Greece', avatar: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=150&h=150&fit=crop', image: 'https://images.unsplash.com/photo-1570077188670-e3a8d69ac5ff?w=1080&h=1080&fit=crop', likes: 1243, caption: 'Sunset views that take your breath away. 🌅✨ #travel #greece #summer', comments: 42, time: '2 HOURS AGO', liked: false }, { id: 2, username: 'design_pro', location: null, avatar: 'https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?w=150&h=150&fit=crop', image: 'https://images.unsplash.com/photo-1600607686527-6fb886090705?w=1080&h=1350&fit=crop', likes: 856, caption: 'Minimalist workspace setup for maximum productivity. 💻☕', comments: 15, time: '5 HOURS AGO', liked: true }, { id: 3, username: 'photography_daily', location: 'Tokyo, Japan', avatar: 'https://images.unsplash.com/photo-1527980965255-d3b416303d12?w=150&h=150&fit=crop', image: 'https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?w=1080&h=1080&fit=crop', likes: 3421, caption: 'Neon nights in Shinjuku. 🏮📸', comments: 128, time: '1 DAY AGO', liked: false } ]; // --- Components --- const StoryCircle = ({ story }) => { return (
{story.username}
{story.isUser ? 'Your story' : story.username} {story.isUser && (
+
)}
); }; const Post = ({ post }) => { const [isLiked, setIsLiked] = useState(post.liked); const [likes, setLikes] = useState(post.likes); const [isSaved, setIsSaved] = useState(false); const handleLike = () => { if (isLiked) { setLikes(likes - 1); } else { setLikes(likes + 1); } setIsLiked(!isLiked); }; return (
{/* Header */}
{post.username}

{post.username}

{post.location &&

{post.location}

}
{/* Image */}
Post content
{/* Actions */}
{/* Likes & Caption */}

{likes.toLocaleString()} likes

{post.username} {post.caption}

View all {post.comments} comments

{post.time}

); }; const Header = () => (
Instagram
3
); const BottomNav = ({ activeTab, setActiveTab }) => { const tabs = [ { id: 'home', icon: Home, label: 'Home' }, { id: 'search', icon: Search, label: 'Search' }, { id: 'create', icon: PlusSquare, label: 'Create' }, { id: 'reels', icon: Film, label: 'Reels' }, { id: 'profile', icon: User, label: 'Profile' }, // Using icon instead of image for simplicity ]; return ( ); }; // --- Main App Component --- const App = () => { const [activeTab, setActiveTab] = useState('home'); // Effect to handle the "Blue Address Bar" requirement useEffect(() => { // This attempts to set the browser theme color to Instagram Blue (or the requested blue) // This works on mobile browsers (Android Chrome, Safari iOS 15+) let metaThemeColor = document.querySelector("meta[name='theme-color']"); if (!metaThemeColor) { metaThemeColor = document.createElement('meta'); metaThemeColor.name = "theme-color"; document.head.appendChild(metaThemeColor); } // Using a specific blue. #0095f6 is Instagram brand blue, // but users sometimes refer to Facebook-blue wrappers or deep blue headers. // I'll stick to a vibrant blue to make it noticeable as per request. metaThemeColor.content = "#0095f6"; // Cleanup: reset on unmount if needed (optional) return () => { // metaThemeColor.content = "#ffffff"; }; }, []); return (
{/* Mobile-centric container */}
{/* Scrollable Content Area */}
{/* Stories Section */}
{STORIES.map(story => ( ))}
{/* Feed Section */}
{POSTS.map(post => ( ))}
{/* Fallback for empty feed or bottom spacing */}

You're all caught up

{/* CSS to hide scrollbar but keep functionality */}
); }; export default App;