No title

import React, { useState, useRef, useEffect } from 'react'; import { Header } from './components/Header'; import { VideoCard } from './components/VideoCard'; import { MOCK_VIDEOS, KEYWORDS, NEW_MOVIES, TRENDING_SONGS } from './constants'; import { ChevronRight, Loader2, Star, TrendingUp, Play, Music, Heart, Share2, MoreVertical, Download, Clock, MoreHorizontal, Home, Grid, Film, Globe, Flame, Zap, Facebook, Instagram, ShoppingBag, Chrome, Link, Clipboard, Compass, User } from 'lucide-react'; import { VideoData } from './types'; const App: React.FC = () => { const [displayedVideos, setDisplayedVideos] = useState(MOCK_VIDEOS); const [isLoadingMore, setIsLoadingMore] = useState(false); const observerTarget = useRef(null); const [activeTab, setActiveTab] = useState('home'); const loadMoreVideos = () => { setIsLoadingMore(true); // Simulate API delay setTimeout(() => { const newVideos = MOCK_VIDEOS.map(v => ({ ...v, id: `${v.id}-${Date.now()}-${Math.random()}` // Ensure unique ID })); setDisplayedVideos(prev => [...prev, ...newVideos]); setIsLoadingMore(false); }, 1500); }; useEffect(() => { const observer = new IntersectionObserver( (entries) => { if (entries[0].isIntersecting && !isLoadingMore) { loadMoreVideos(); } }, { threshold: 0.1 } ); if (observerTarget.current) { observer.observe(observerTarget.current); } return () => { if (observerTarget.current) { observer.unobserve(observerTarget.current); } }; }, [isLoadingMore]); const renderNewMoviesShelf = (index: number) => (
{/* Red decorative elements */}

New Releases

Fresh from the box office

{NEW_MOVIES.map((movie) => (
{movie.title} {/* Hover Overlay */}
{/* Rating Badge */}
{movie.rating}

{movie.title}

{movie.genre}

))}
); const renderTrendingSongsShelf = (index: number) => { return (
{/* Section Header - Top Hindi Hits (Above Trending Songs) */}

Top Hindi Hits

{/* Playlist Card */}
{/* Clean Look - No background image glow */} {/* Inner Header: Trending Song */}

Trending Song

Weekly Top 10 India
{/* Vertical Song List */}
{TRENDING_SONGS.slice(0, 4).map((song, idx) => (
{idx + 1} {/* Album Cover */}
{song.title}
{/* Song Info */}

{song.title}

{song.artist}

{/* Right Icon */}
{song.duration}
))}
); } const NAV_ITEMS = [ { id: 'explore', icon: Compass, label: 'Explore' }, { id: 'songs', icon: Music, label: 'Songs' }, { id: 'home', icon: Home, label: 'Home' }, { id: 'movies', icon: Film, label: 'Movies' }, { id: 'profile', icon: User, label: 'Profile' }, ]; return (
{/* 1. Keywords Pill Scroll */}
{KEYWORDS.map((kw, i) => ( ))}
{/* 2. Featured Now (Hero) - Added Logo */}

Featured Now

View All
{/* Horizontal Scroll */}
{MOCK_VIDEOS.map((video) => (
{video.title}
NEW {video.duration}

{video.title}

))}
{/* 3. Social Media Downloader */}
{/* Background decor */}
{/* Header */}

Free Social Media Downloader

Paste a link to download videos instantly

{/* Icons Row */}
{[ { id: 'fb', icon: Facebook, name: 'Facebook', color: 'bg-[#1877F2]', text: 'text-white' }, { id: 'google', icon: Chrome, name: 'Google', color: 'bg-white', text: 'text-gray-700', border: true }, { id: 'insta', icon: Instagram, name: 'Instagram', color: 'bg-gradient-to-tr from-[#fdf497] via-[#fd5949] to-[#d6249f]', text: 'text-white' }, { id: 'flip', icon: ShoppingBag, name: 'Flipkart', color: 'bg-[#2874F0]', text: 'text-white' } ].map((item) => (
{item.name}
))}
{/* Input Bar */}
{/* 4. Dynamic Video Feed */}

Trending For You

{displayedVideos.map((video, idx) => { const itemNumber = idx + 1; const shouldRenderShelf = itemNumber % 5 === 0; let ShelfComponent = null; if (shouldRenderShelf) { const setNumber = itemNumber / 5; if (setNumber % 2 !== 0) { ShelfComponent = renderTrendingSongsShelf(idx); } else { ShelfComponent = renderNewMoviesShelf(idx); } } return ( {ShelfComponent} ); })}
{isLoadingMore && (
Loading more videos...
)}
{/* Modern Neumorphic Bottom Navigation */}
{/* Background Bar with Soft Curve - Removed soft shadow as requested */}
{/* Left Items */} {NAV_ITEMS.slice(0, 2).map((item) => ( ))} {/* Spacer for Center Button */}
{/* Right Items */} {NAV_ITEMS.slice(3, 5).map((item) => (
Previous Post Next Post