refactor: userpreferences are now in the DB
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user