refactor: userpreferences are now in the DB

This commit is contained in:
Julien Froidefond
2025-09-17 08:30:36 +02:00
parent 4f137455f4
commit 14d300c682
24 changed files with 763 additions and 404 deletions

View File

@@ -1,5 +1,6 @@
import { tasksService } from '@/services/tasks';
import { tagsService } from '@/services/tags';
import { userPreferencesService } from '@/services/user-preferences';
import { HomePageClient } from '@/components/HomePageClient';
// Force dynamic rendering (no static generation)
@@ -7,10 +8,11 @@ export const dynamic = 'force-dynamic';
export default async function HomePage() {
// SSR - Récupération des données côté serveur
const [initialTasks, initialStats, initialTags] = await Promise.all([
const [initialTasks, initialStats, initialTags, initialPreferences] = await Promise.all([
tasksService.getTasks(),
tasksService.getTaskStats(),
tagsService.getTags()
tagsService.getTags(),
userPreferencesService.getAllPreferences()
]);
return (
@@ -18,6 +20,7 @@ export default async function HomePage() {
initialTasks={initialTasks}
initialStats={initialStats}
initialTags={initialTags}
initialPreferences={initialPreferences}
/>
);
}