import { tasksService } from '@/services/tasks';
import { tagsService } from '@/services/tags';
import { HomePageClient } from '@/components/HomePageClient';

export default async function HomePage() {
  // SSR - Récupération des données côté serveur
  const [initialTasks, initialStats, initialTags] = await Promise.all([
    tasksService.getTasks(),
    tasksService.getTaskStats(),
    tagsService.getTags()
  ]);

  return (
    <HomePageClient 
      initialTasks={initialTasks}
      initialStats={initialStats}
      initialTags={initialTags}
    />
  );
}
