import Link from 'next/link'; import { ArrowRight } from 'lucide-react'; import ArticleCard from './ArticleCard'; const CATEGORY_INFO = { 'ai-tools': { label: 'AI Tools', icon: '🤖', accent: 'text-emerald-600 dark:text-emerald-400', border: 'border-emerald-200 dark:border-emerald-900' }, 'cybersec': { label: 'Cybersec', icon: '🔒', accent: 'text-red-600 dark:text-red-400', border: 'border-red-200 dark:border-red-900' }, 'automation': { label: 'Automation', icon: '⚡', accent: 'text-amber-600 dark:text-amber-400', border: 'border-amber-200 dark:border-amber-900' }, 'ai-dev': { label: 'AI Dev', icon: '💻', accent: 'text-blue-600 dark:text-blue-400', border: 'border-blue-200 dark:border-blue-900' }, }; /** * Категорийный ряд: заголовок + 3 карточки + «все →». * Показываем только если в категории есть хотя бы 1 статья. */ export default function CategoryRow({ category, articles }) { if (!articles || articles.length === 0) return null; const info = CATEGORY_INFO[category] || { label: category, icon: '📝', accent: 'text-neutral-700', border: 'border-neutral-200' }; return (
{info.icon}

{info.label}

Все материалы
{articles.map(a => )}
); }