feat: improve TaskCard and TagList components, enhance task loading logic
- Updated TaskCard to conditionally render footer elements based on available data (due date, source, completion status). - Enhanced TagList to visually indicate deleting tags and improved button styles for better UX. - Modified useTasks hook to refresh tasks only if no initial data is present, optimizing loading behavior. - Updated TagsPageClient to manage local tags and handle optimistic UI updates during tag deletion.
This commit is contained in:
@@ -222,10 +222,12 @@ export function useTasks(
|
||||
}
|
||||
}, [refreshTasks]);
|
||||
|
||||
// Charger les tâches au montage et quand les filtres changent
|
||||
// Charger les tâches au montage seulement si pas de données initiales
|
||||
useEffect(() => {
|
||||
refreshTasks();
|
||||
}, [refreshTasks]);
|
||||
if (!initialData?.tasks?.length) {
|
||||
refreshTasks();
|
||||
}
|
||||
}, [refreshTasks, initialData?.tasks?.length]);
|
||||
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user