We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 101ff37 commit 1ed709aCopy full SHA for 1ed709a
admin/src/pages/NewProduct.jsx
@@ -122,7 +122,7 @@ export default function NewProduct() {
122
getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => {
123
const product = { ...inputs, image: downloadURL, category: categories }
124
console.log(product);
125
- const addProducts = async (product, dispatch) => {
+ const addProducts = async () => {
126
dispatch(addProductStart())
127
try {
128
const response = await userRequest.post('/products/', product )
@@ -132,7 +132,7 @@ export default function NewProduct() {
132
}
133
134
135
- addProducts(product, dispatch);
+ addProducts();
136
});
137
138
);
0 commit comments