From 09405f2a9b7a6b80aae315188eac6d78a5bc31ce Mon Sep 17 00:00:00 2001 From: Maria Aparecida Date: Thu, 21 Aug 2025 13:36:50 -0400 Subject: [PATCH 1/2] =?UTF-8?q?Renderiza=C3=A7=C3=A3o=20de=20lista=20vazia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TaskList.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/TaskList.tsx b/src/components/TaskList.tsx index 1b32484..73c782e 100644 --- a/src/components/TaskList.tsx +++ b/src/components/TaskList.tsx @@ -19,7 +19,12 @@ const TaskList: React.FC = ({ onRemoveItem, }) => { if (tasks.length === 0) { - return null; + return ( + + ✨ Nenhuma tarefa encontrada. Que tal adicionar uma nova? + + ); +}; } return ( From 5d206a30b7b3938efb6063cbdf51b472e40eed84 Mon Sep 17 00:00:00 2001 From: Maria Aparecida Date: Thu, 21 Aug 2025 16:04:18 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Renderiza=C3=A7=C3=A3o=20da=20lista=20de=20?= =?UTF-8?q?tarefas=20com=20status=20pendente/conclu=C3=ADda=20e=20mensagem?= =?UTF-8?q?=20amig=C3=A1vel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TaskList.tsx | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/components/TaskList.tsx b/src/components/TaskList.tsx index 73c782e..a5d820a 100644 --- a/src/components/TaskList.tsx +++ b/src/components/TaskList.tsx @@ -1,4 +1,4 @@ -//componente que cria a lista de tarefas// +// componente que cria a lista de tarefas // import React from "react"; import { List, Typography } from "@mui/material"; @@ -18,30 +18,40 @@ const TaskList: React.FC = ({ onToggleComplete, onRemoveItem, }) => { + // Se não houver tarefas, mostra uma mensagem amigável if (tasks.length === 0) { return ( - - ✨ Nenhuma tarefa encontrada. Que tal adicionar uma nova? - - ); -}; + + Nenhuma tarefa encontrada. Bora trabalhar?✨ + + ); } + // Caso haja tarefas, renderiza a lista return ( {title} + {tasks.map((task: Task) => ( - +
+ + + {task.completed ? "✅ Concluída" : "⏳ Pendente"} + +
))}
); }; -export default TaskList; \ No newline at end of file +export default TaskList;