'use client'; import Link from 'next/link'; import type { GuideMetadata } from '@/types/knowledge'; import { DifficultyBadge } from './DifficultyBadge'; import { categoryConfig } from '@/types/knowledge'; interface GuideCardProps { guide: GuideMetadata; } /** * Card component for displaying guide preview in listings */ export function GuideCard({ guide }: GuideCardProps) { const category = categoryConfig[guide.category]; return ( {/* Header with icon and difficulty */}
{guide.icon || category.icon}
{category.label}
{/* Title */}

{guide.title}

{/* Description */}

{guide.description}

{/* Footer with metadata */}
{guide.readTime} {guide.prerequisites && guide.prerequisites.length > 0 && ( {guide.prerequisites.length} prereq )}
Read guide
{/* Tags */} {guide.tags.length > 0 && (
{guide.tags.slice(0, 3).map((tag) => ( {tag} ))} {guide.tags.length > 3 && ( +{guide.tags.length - 3} more )}
)} ); } function ClockIcon() { return ( ); } function RequiresIcon() { return ( ); }