From 138af2321525f552981176aeb14c0a82422e5b05 Mon Sep 17 00:00:00 2001 From: sanju Date: Thu, 24 Oct 2024 00:28:22 +0530 Subject: [PATCH] fix task entry behaviour issue --- client/src/components/TodoItem.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 && } + );