import React, { useState, useEffect, useMemo } from 'react'; import { VirtualTable } from './VirtualTable'; import { SearchAndFilter } from './SearchAndFilter'; import { StatsOverview } from './StatsOverview'; import { Button } from './ui/button'; import { ThemeProvider } from './ThemeProvider'; import { ThemeToggle } from './ThemeToggle'; import type { VideoData } from '../types/video'; import { searchVideos, filterVideos } from '../utils/search'; interface ApiResponse { videos?: VideoData[]; error?: string; message?: string; } export default function VideoClassifierApp({ videos }: { videos: VideoData[] }) { const [searchTerm, setSearchTerm] = useState(''); const [filters, setFilters] = useState({ classification: 'all', language: 'all', playlist_name: 'all' }); // Filter and search data const filteredData = useMemo(() => { let result = videos; // Apply filters result = filterVideos(result, filters); // Apply search result = searchVideos(result, searchTerm); return result; }, [videos, searchTerm, filters]); if (!videos) { return (
📁

CSV File Not Found

It seems the video_classifications.csv file is missing or not properly configured.

To fix this:

  1. Make sure video_classifications.csv exists in your project root
  2. Run your YouTube classifier script to generate the CSV
  3. Refresh this page
); } return (
{/* Header */}

YouTube Video Classifier

AI-powered video classification and management platform. Search, filter, and organize your YouTube video collection with intelligent categorization.

{/* Stats Overview */} {videos.length > 0 && ( )} {/* Search and Filter */} {videos.length > 0 && ( )} {/* Results */} {videos.length > 0 ? ( filteredData.length > 0 ? ( ) : (
🔍

No results found

Try adjusting your search terms or filters

) ) : (
📹

No videos found

Your CSV file appears to be empty

)} {/* Footer */}

{videos.length} videos indexed

); }