From 10d88fd4d6c3f92beee8e261a0df4545509ec32e Mon Sep 17 00:00:00 2001 From: JulyaPetrovskaya <119932772+JulyaPetrovskaya@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:41:59 +0300 Subject: [PATCH] solution --- src/components/TodoItem/TodoItem.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/TodoItem/TodoItem.tsx b/src/components/TodoItem/TodoItem.tsx index c2ba365427..db0a021dfc 100644 --- a/src/components/TodoItem/TodoItem.tsx +++ b/src/components/TodoItem/TodoItem.tsx @@ -27,7 +27,7 @@ export const TodoItem: React.FC = ({ todo, isLoading }) => { inputField.current.focus(); } }, [isEditing]); - // если isEditing равно true. Если isEditing + // если isEditing равно true. Если isEditing // становится false, то фокус не будет устанавливаться. const handleDoubleClick = () => { @@ -73,8 +73,7 @@ export const TodoItem: React.FC = ({ todo, isLoading }) => { } }; - - return ( + return (
= ({ todo, isLoading }) => { onChange={() => !isLoading && toggleTodo(todo)} /> - + {!isEditing ? ( <> + > { title } @@ -112,7 +111,7 @@ export const TodoItem: React.FC = ({ todo, isLoading }) => { × - ): ( + ) : (