From 0da52a786a4f247ca16828e524054179f927ce45 Mon Sep 17 00:00:00 2001 From: franco sanchez Date: Thu, 12 Sep 2024 12:44:49 -0300 Subject: [PATCH] chore: only the stars were left on the form --- src/components/forms/NewBook.tsx | 42 +++++++++----------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/src/components/forms/NewBook.tsx b/src/components/forms/NewBook.tsx index 9fbf674..6c29b10 100644 --- a/src/components/forms/NewBook.tsx +++ b/src/components/forms/NewBook.tsx @@ -113,12 +113,12 @@ export function FormNewBook() { handleImage(e, setCropData, onOpen); } - // function handleRatingChange(newRating: number) { - // setBooks((books) => ({ - // ...books, - // rating: newRating, - // })); - // } + function handleRatingChange(newRating: number) { + setBooks((books) => ({ + ...books, + rating: newRating, + })); + } function getCropData() { getCrop(crop, setPreviewImg, books, setBooks, onClose); @@ -551,7 +551,7 @@ export function FormNewBook() { placeholder='Elija un Formato' /> - + Calificación{' '} @@ -560,31 +560,11 @@ export function FormNewBook() { -