Merge branch 'develop' into MED-97

This commit is contained in:
2025-09-26 17:01:24 +03:00
86 changed files with 11249 additions and 3151 deletions

View File

@@ -168,7 +168,12 @@ export async function addToCart({
})
.catch(medusaError);
return cart;
const newCart = await getOrSetCart(countryCode);
const addedItem = newCart.items?.filter(
(item) => !cart.items?.some((oldCartItem) => oldCartItem.id === item.id),
)?.[0];
return { newCart, addedItem };
}
export async function updateLineItem({

View File

@@ -21,7 +21,6 @@ export const listCategories = async (query?: Record<string, any>) => {
...query,
},
next,
cache: 'force-cache',
},
)
.then(({ product_categories }) => product_categories);
@@ -57,7 +56,6 @@ export const getProductCategories = async ({
limit,
},
next,
//cache: "force-cache",
},
);
};

View File

@@ -61,11 +61,6 @@ export const listOrders = async (
};
export const createTransferRequest = async (
state: {
success: boolean;
error: string | null;
order: HttpTypes.StoreOrder | null;
},
formData: FormData,
): Promise<{
success: boolean;

View File

@@ -15,7 +15,7 @@ export const listRegions = async () => {
.fetch<{ regions: HttpTypes.StoreRegion[] }>(`/store/regions`, {
method: 'GET',
next,
cache: 'force-cache',
// cache: 'force-cache',
})
.then(({ regions }) => regions)
.catch(medusaError);