Files
towercontrol/src/app/page.tsx
Julien Froidefond 95af83b0bc feat: integrate tags into HomePage and TasksContext
- Added `initialTags` prop to `HomePageClient` for passing tag data.
- Updated `TasksProvider` to accept and utilize `initialTags`, enhancing tag management.
- Modified `useTags` hook to initialize state with provided tags and conditionally refresh tags based on initial data.
- Updated server-side data fetching in `HomePage` to include tags from the `tagsService`.
2025-09-14 22:45:52 +02:00

21 lines
569 B
TypeScript

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}
/>
);
}