import React from 'react'; import { BookProject, UserProfile } from '../types'; import { Plus, Book, Clock, Star, ChevronRight, LogOut, LayoutDashboard, User, Target, Flame, Edit3 } from 'lucide-react'; interface DashboardProps { user: UserProfile; projects: BookProject[]; onSelect: (id: string) => void; onCreate: () => void; onLogout: () => void; onPricing: () => void; onProfile: () => void; } const Dashboard: React.FC = ({ user, projects, onSelect, onCreate, onLogout, onPricing, onProfile }) => { return (
{/* User Card */}
Avatar

Bonjour, {user.name} 👋

{user.subscription.plan} Membre depuis le 24 janv.
{/* Stats Section */}

Série actuelle

{user.stats.writingStreak} Jours

Mots écrits

{user.stats.totalWordsWritten.toLocaleString()}

Objectif du jour

{user.preferences.dailyWordGoal} Mots

{/* Project List */}

Mes Romans

{projects.map(p => (
onSelect(p.id)} className="bg-white p-8 rounded-[2.5rem] border border-indigo-50 shadow-sm hover:shadow-2xl hover:scale-[1.02] transition-all cursor-pointer group flex flex-col justify-between h-64" >

{p.title}

Dernière modification : {new Date(p.lastModified).toLocaleDateString()}

{p.chapters.length} Chapitres
))} {projects.length === 0 && (

Prêt à commencer votre premier roman ?

)}
{/* Sidebar Stats & Plan */}

Utilisation

Actions IA {user.usage.aiActionsCurrent} / {user.usage.aiActionsLimit === 999999 ? '∞' : user.usage.aiActionsLimit}
Emplacements Roman {projects.length} / {user.usage.projectsLimit}
); }; export default Dashboard;