import React from 'react' import { motion } from 'framer-motion' import { useNavigate } from 'react-router-dom' import { BookOpen, Brain, Trophy, ArrowRight } from 'lucide-react' const TopicCard = ({ topic, delay = 0 }) => { const navigate = useNavigate() const difficultyColors = { beginner: 'bg-green-100 text-green-700 border-green-200', intermediate: 'bg-yellow-100 text-yellow-700 border-yellow-200', advanced: 'bg-red-100 text-red-700 border-red-200' } const categoryIcons = { 'Programming': Brain, 'AI/ML': Trophy, 'Web': BookOpen, 'Database': BookOpen } const CategoryIcon = categoryIcons[topic.category] || BookOpen return ( navigate(`/learn/${topic.id}`)} className="card cursor-pointer group relative overflow-hidden" > {/* Background decoration */}
{/* Header */}
{topic.difficulty}
{/* Content */}

{topic.name}

{topic.description}

{topic.category} Start Learning
) } export default TopicCard