fix crud product

This commit is contained in:
hamid zarghami
2026-02-25 14:07:12 +03:30
parent f3f7e9c3ec
commit 0c736f19a0
6 changed files with 12 additions and 14 deletions
+1 -2
View File
@@ -25,7 +25,6 @@ const CreateProduct: FC = () => {
const { mutate: createProduct, isPending } = useCreateProduct()
const handleSave = (values: CreateProductType) => {
values.categoryId = Number(values.categoryId)
createProduct(values, {
onSuccess: () => {
toast.success('عملیات با موفقیت انجام شد')
@@ -40,7 +39,7 @@ const CreateProduct: FC = () => {
const formik = useFormik<CreateProductType>({
initialValues: {
categoryId: undefined,
categoryId: '',
desc: '',
images: [],
isActive: true,