diff --git a/src/components/forms/NewBook.tsx b/src/components/forms/NewBook.tsx index 6c29b10..9fbf674 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,11 +560,31 @@ export function FormNewBook() { - + handleFieldChange('rating', selectedOption?.value) + } + options={[ + { value: 0, label: 0 }, + { value: 1, label: 1 }, + { value: 1.5, label: 1.5 }, + { value: 2, label: 2 }, + { value: 2.5, label: 2.5 }, + { value: 3, label: 3 }, + { value: 3.5, label: 3.5 }, + { value: 4, label: 4 }, + { value: 4.5, label: 4.5 }, + { value: 5, label: 5 }, + ]} + placeholder='Elija una Calificación' /> + + +