Skip to content
Snippets Groups Projects
Commit 3e3d8285 authored by VAUCHAIR MARLINE's avatar VAUCHAIR MARLINE
Browse files

:bug: fix update stock

parent 72a3dfd4
Branches
1 merge request!7🔀 V1
......@@ -8,7 +8,7 @@ const Stock = () => {
let [search, setSearch] = useState("");
let [productsList, setProductsList] = useState<Product[]>([]);
let [rawProductList, setRawProductList] = useState<Product[]>([]);
let oldQuantity = 0;
let [oldQuantity, setOldQuantity] = useState((0));
useEffect(() => {
// Filter products by name with the search term
......@@ -48,7 +48,7 @@ const Stock = () => {
console.log("error update stock BACK");
});
}else{
oldQuantity = product.stock;
setOldQuantity(product.stock);
}
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment