diff --git a/frontend/src/pages/TodosPage.tsx b/frontend/src/pages/TodosPage.tsx index c087bf2..b56507a 100644 --- a/frontend/src/pages/TodosPage.tsx +++ b/frontend/src/pages/TodosPage.tsx @@ -4,6 +4,7 @@ import type { Todo, TodoCreate, TodoFilters } from '../api/todos' import { fetchTodos, createTodo, updateTodo, deleteTodo, postponeTodo } from '../api/todos' import SwipeableRow from '../components/todos/SwipeableRow' import TodoForm from '../components/todos/TodoForm' +import Modal from '../components/Modal' type EditingTodo = Todo | null @@ -151,22 +152,14 @@ export default function TodosPage() { {/* Formulaire de création */} {showForm && ( -
-
- setShowForm(false)} extended /> -
-
- setShowForm(false)} /> -
-
+ setShowForm(false)}> + setShowForm(false)} extended /> + )} {/* Formulaire d'édition */} {editingTodo && ( -
-

- Modifier la tâche -

+ setEditingTodo(null)}> handleUpdate(editingTodo.id, data)} onCancel={() => setEditingTodo(null)} @@ -182,7 +175,7 @@ export default function TodosPage() { tags: editingTodo.tags, }} /> -
+ )} {loading && ( @@ -377,58 +370,54 @@ export default function TodosPage() { {/* FAB mobile (au-dessus de la barre de navigation) */} - {!showForm && ( - - )} + {/* Bouton création laptop */} - {!showForm && ( - - )} + ) }