mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-05-20 18:34:53 +00:00
Set image value in Item to list, to support more images in the future
Set all pages to Typescript
This commit is contained in:
parent
7d8d19a6e9
commit
9dce9235d6
16 changed files with 63 additions and 59 deletions
|
@ -127,13 +127,12 @@ export async function postVerifyCart(
|
|||
|
||||
const newCartData: Record<string, CartItem> = {};
|
||||
|
||||
Object.entries(currentCartData).forEach(([key, value]) => {
|
||||
Object.entries(currentCartData).forEach(([uuid, currentData]) => {
|
||||
verifiedItems.forEach((verifiedItem: Item) => {
|
||||
if (verifiedItem.uuid === key) {
|
||||
console.log(verifiedItem, key);
|
||||
newCartData[key] = {
|
||||
uuid: value.uuid,
|
||||
amount: value.amount,
|
||||
if (verifiedItem.uuid === uuid) {
|
||||
console.log(verifiedItem, uuid);
|
||||
newCartData[uuid] = {
|
||||
amount: currentData.amount,
|
||||
data: verifiedItem,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue