Skip to content

работа с toolkit query - #12

Open
yadroRus wants to merge 3 commits into
mainfrom
hw-10
Open

работа с toolkit query#12
yadroRus wants to merge 3 commits into
mainfrom
hw-10

Conversation

@yadroRus

@yadroRus yadroRus commented Aug 4, 2025

Copy link
Copy Markdown
Owner
image

Comment on lines +23 to +30
{editMode ? (
<>
<input ref={refText} type="text" defaultValue={text} />
<input ref={refRating} type="text" defaultValue={rating} />
</>
) : (
<span className={styles.comment}>{text}</span>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для редактирования нужно переиспользовать компонент формы. Вся логика уже реализована, для редактирования просто нужно прокинуть onSubmit и начальные значения полей

Comment on lines +11 to +12
// const requestStatus = useRequest(getDish, dishId);
// const dish = useSelector((state) => selectDishById(state, dishId));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давайте сразу почистим закоментированный код

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants