Skip to content

Commit 1ed709a

Browse files
committed
Fix: Post method issue to server
1 parent 101ff37 commit 1ed709a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

admin/src/pages/NewProduct.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function NewProduct() {
122122
getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => {
123123
const product = { ...inputs, image: downloadURL, category: categories }
124124
console.log(product);
125-
const addProducts = async (product, dispatch) => {
125+
const addProducts = async () => {
126126
dispatch(addProductStart())
127127
try {
128128
const response = await userRequest.post('/products/', product )
@@ -132,7 +132,7 @@ export default function NewProduct() {
132132
}
133133
}
134134

135-
addProducts(product, dispatch);
135+
addProducts();
136136
});
137137
}
138138
);

0 commit comments

Comments
 (0)