'use client' import { motion } from 'motion/react' import { Clock, ChevronRight, Play } from 'lucide-react' import { useLanguage } from '@/lib/i18n' import { DashboardWidgetTitleRow } from '@/components/dashboard-widget-title-row' export interface ResumeNote { id: string title: string | null excerpt: string notebookName: string notebookColor: string updatedAt: string notebookId: string | null } export interface DashboardResumeHeroProps { notes: ResumeNote[] loading?: boolean onSelect: (id: string, notebookId: string | null) => void formatRelativeTime: (date: string) => string prefersReducedMotion?: boolean } export function DashboardResumeHero({ notes, loading, onSelect, formatRelativeTime, prefersReducedMotion, }: DashboardResumeHeroProps) { const { t } = useLanguage() const hero = notes[0] const rest = notes.slice(1, 4) if (loading) { return (
) } if (!hero) { return (

{t('homeDashboard.noRecentNotes')}

) } return (
} title={t('homeDashboard.continue')} className="mb-2" />
onSelect(hero.id, hero.notebookId)} className="w-full text-start px-5 pb-5 group cursor-pointer" >
{hero.notebookName} {formatRelativeTime(hero.updatedAt)}

{hero.title || t('homeDashboard.untitled')}

{hero.excerpt && (

{hero.excerpt}

)}
{t('homeDashboard.resumeOpen')}
{rest.length > 0 && (
{rest.map(note => ( ))}
)}
) }