ok banget

This commit is contained in:
zadit
2024-10-30 03:32:48 +07:00
parent 1ecc6db645
commit 5a2b9b2f86
18 changed files with 244 additions and 130 deletions

View File

@@ -8,6 +8,7 @@ const Item = ({
price: initialPrice,
qty: initialQty,
imageUrl,
imageFile,
id,
onPlusClick,
onNegativeClick,
@@ -17,7 +18,7 @@ const Item = ({
isAvailable,
isBeingEdit,
}) => {
const [selectedImage, setSelectedImage] = useState(null);
const [selectedImage, setSelectedImage] = useState(imageFile);
const [previewUrl, setPreviewUrl] = useState(imageUrl);
const [itemQty, setItemQty] = useState(blank ? 0 : initialQty);
const [itemName, setItemName] = useState(initialName);
@@ -219,6 +220,7 @@ const Item = ({
style={{
backgroundColor: "white",
width: "150px",
color: '#73a585'
}}
onClick={isBeingEdit ? handleUpdate : handleCreate}
>