diff --git a/pages/dashboard/products/add-product.tsx b/pages/dashboard/products/add-product.tsx index c93098707..83a9be72e 100644 --- a/pages/dashboard/products/add-product.tsx +++ b/pages/dashboard/products/add-product.tsx @@ -59,9 +59,9 @@ const AddProduct = () => { initialValues: { name: '', description: '', - category_id: '', + sub_category_id: '', price: '', - discountPrice: '', + discountPrice: '0', tax: '', currency: 'NGN', assets_link: '', @@ -147,7 +147,7 @@ const AddProduct = () => { event.target.blur(); }; const handleOptionChange = (event: React.ChangeEvent) => { - setProducts({ ...products, category_id: event.target.value }); + setProducts({ ...products, sub_category_id: event.target.value }); }; const fetchCategories = async () => { @@ -194,7 +194,7 @@ const AddProduct = () => { name: '', description: '', quantity: '', - category_id: '', + sub_category_id: '', price: '', discountPrice: '0', tax: '', @@ -500,12 +500,12 @@ const AddProduct = () => {