'use client' import Link from 'next/link' import type { ReactNode } from 'react' import { useTranslation } from 'react-i18next' import { ProgressRing } from '@/components/space/learning/ProgressRing' import { formatRelativeTime } from '@/lib/relative-time' interface LearningCardContentProps { title: string subtitle?: ReactNode icon: ReactNode updatedAt?: number progress?: number } /** Shared identity row, also used inside libraries with their own menus or video thumbnails. */ export function LearningCardContent({ title, subtitle, icon, updatedAt, progress, }: LearningCardContentProps) { const { i18n } = useTranslation() return ( <> {icon}

{title}

{subtitle && (
{subtitle}
)}
{progress !== undefined && } {updatedAt !== undefined && Number.isFinite(updatedAt) && ( )}
) } /** User-authored titles are rendered verbatim; callers translate only product copy. */ export function LearningCard({ href, onClick, ...content }: LearningCardContentProps & { href: string; onClick?: () => void }) { return ( ) }