diff --git a/client/src/components/TodoItem.tsx b/client/src/components/TodoItem.tsx index aabd2dd..61daa03 100644 --- a/client/src/components/TodoItem.tsx +++ b/client/src/components/TodoItem.tsx @@ -1,5 +1,5 @@ import { Badge, Box, Flex, Spinner, Text } from "@chakra-ui/react"; -import { FaCheckCircle } from "react-icons/fa"; +import { FaRegCircle,FaCheckCircle } from "react-icons/fa"; import { MdDelete } from "react-icons/md"; import { Todo } from "./TodoList"; import { useMutation, useQueryClient } from "@tanstack/react-query"; @@ -68,6 +68,7 @@ const TodoItem = ({ todo }: { todo: Todo }) => { > {todo.body} + {todo.completed && ( Done @@ -80,14 +81,18 @@ const TodoItem = ({ todo }: { todo: Todo }) => { )} - updateTodo()}> - {!isUpdating && } + updateTodo()}> + {!isUpdating && (todo.completed)?: + + } + {isUpdating && } deleteTodo()}> {!isDeleting && } {isDeleting && } + );